Functions handling OAuth2 token storage.
Functions handling OAuth2 token storage.
(create-token ttype client user scope & [ttl access-secret])
Creates and retuns new token.
Creates and retuns new token.
(find-access-token secret)
Finds access token issued for given client with given secret code.
Finds access token issued for given client with given secret code.
(find-by-key key)
Finds token by vectorized exact key. Each element of key is used to compose query depending on underlaying store implementation.
Finds token by vectorized exact key. Each element of key is used to compose query depending on underlaying store implementation.
(find-by-pattern key)
Finds token by vectorized pattern key. Each nil element of key will be replaced with wildcard specific for underlaying store implementation.
Finds token by vectorized pattern key. Each nil element of key will be replaced with wildcard specific for underlaying store implementation.
(find-refresh-token client-id secret)
Finds refresh token issued for given client with given secret code.
Finds refresh token issued for given client with given secret code.
(generate-access-token client user scope & [refresh? type])
Generates access-token for given client-login pair within provided scope.
Additional options (type
and refresh?
) override default token type
(Bearer) and generate refresh-token, which is not created by default.
When called on client-user pair which already had tokens generated, effectively overrides both tokens revoking the old ones.
To get tokens generated both client and user need to be enabled. Otherwise HTTP 400 (invalid request) is returned.
Generates access-token for given client-login pair within provided scope. Additional options (`type` and `refresh?`) override default token type (Bearer) and generate refresh-token, which is not created by default. When called on client-user pair which already had tokens generated, effectively overrides both tokens revoking the old ones. To get tokens generated both client and user need to be enabled. Otherwise HTTP 400 (invalid request) is returned.
(init-store type config)
Initializes token store according to given type and configuration.
Initializes token store according to given type and configuration.
(purge-tokens)
Removes token from store.
Removes token from store.
(revoke-client-tokens client)
(revoke-client-tokens client user)
Revokes access- and refresh-tokens of given client (and user optionally).
Revokes access- and refresh-tokens of given client (and user optionally).
cljdoc is a website building & hosting documentation for Clojure/Script libraries
× close