Snippets Collections
## You need:
## client_id, secret_id, user, password, realm , keycloak url

access_token=$(curl --silent\
 -d "client_id=client_id" \
-d "client_secret=secret_id" \
-d "username=user" \
-d "password=password" \
-d "grant_type=password" \
"https://keycloak_url/auth/realms/{{realm}}/protocol/openid-connect/token" | jq -r '.access_token')

## show token
echo $access_token
app.get('/checkFilelink', async (req, res, next) => {
    try {
      const CancelToken = axios.CancelToken;
      const source = CancelToken.source();
      setTimeout(() => {
        source.cancel('Operation canceled by the user.');
      }, 5000);
      let url = req.query.url;
      var response = await axios.get(url, {
        cancelToken: source.token,
        progress: false
      });
      res.json(response);
    } catch (e) {
      res.send(e)
    }
  });
star

Wed Apr 05 2023 04:45:58 GMT+0000 (Coordinated Universal Time) https://maticz.com/stepn-clone-app

#stepn #business #token #nft
star

Sun Feb 26 2023 12:48:26 GMT+0000 (Coordinated Universal Time)

#keycloak #curl #token
star

Thu Sep 01 2022 09:08:01 GMT+0000 (Coordinated Universal Time)

#axios #cancel #token
star

Mon Aug 08 2022 10:33:22 GMT+0000 (Coordinated Universal Time) https://maticz.com/bep20-token-development

#bep20 #token
star

Mon Aug 08 2022 10:31:01 GMT+0000 (Coordinated Universal Time) https://maticz.com/erc20-ethereum-token-development

#erc20 #token

Save snippets that work with our extensions

Available in the Chrome Web Store Get Firefox Add-on Get VS Code extension