Liking cljdoc? Tell your friends :D

cerber.stores.token

Functions handling OAuth2 token storage.

Functions handling OAuth2 token storage.
raw docstring

create-tokenclj

(create-token ttype client user scope & [ttl access-secret])

Creates and retuns new token.

Creates and retuns new token.
sourceraw docstring

create-token-storecljmultimethod

source

find-access-tokenclj

(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.
sourceraw docstring

find-by-keyclj

(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.
sourceraw docstring

find-by-patternclj

(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.
sourceraw docstring

find-refresh-tokenclj

(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.
sourceraw docstring

generate-access-tokenclj

(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.
sourceraw docstring

init-storeclj

(init-store type config)

Initializes token store according to given type and configuration.

Initializes token store according to given type and configuration.
sourceraw docstring

normalizeclj

(normalize token)
source

purge-tokensclj

(purge-tokens)

Removes token from store.

Removes token from store.
sourceraw docstring

revoke-access-tokenclj

(revoke-access-token secret)
source

revoke-by-keyclj

(revoke-by-key key)
source

revoke-by-patternclj

(revoke-by-pattern pattern)
source

revoke-client-tokensclj

(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).
sourceraw docstring

token-storeclj

source

cljdoc is a website building & hosting documentation for Clojure/Script libraries

× close