Liking cljdoc? Tell your friends :D

liberator-mixin.authorisation.core

Liberator mixin to authorise a request based on an access token

Liberator mixin to authorise a request based on an access token
raw docstring

scope-validatorclj

(scope-validator required-scopes)

Returns a validator that ensures all required scopes are included in the token.

Returns a validator that ensures all required scopes are included in the
token.
sourceraw docstring

with-access-tokenclj

(with-access-token)

Returns a mixin that extracts the access token from the authorisation header

:token-type - the scheme under the authorisation header (default is Bearer) :token-parser - a function that performs parsing of the token before validation (optional)

This mixin should only be used once.

Returns a mixin that extracts the access token from the authorisation header

:token-type - the scheme under the authorisation header (default is Bearer)
:token-parser - a function that performs parsing of the token before
validation (optional)

This mixin should only be used once.
sourceraw docstring

with-jws-access-tokenclj

(with-jws-access-token)

Returns a mixin that validates the jws access token ensure it includes the claims and that claim passes validation, finally it stores the authentication and authorisation state on the context under :identity

This mixin assumes a token already on the context under :token

:token-key - the secret can be a function which is provided the JOSE header as its single param :token-options - that is used to validate the standard claims of the token (aud, iss, sub, exp, nbf, iat) (optional) :token-claims - a map of expected claims and how to validate them as function that takes the claim value (optional)

This mixin should only be used once.

Returns a mixin that validates the jws access token ensure it includes the
claims and that claim passes validation, finally it stores the authentication
and authorisation state on the context under :identity

This mixin assumes a token already on the context under :token

:token-key - the secret can be a function which is provided the JOSE header
as its single param
:token-options - that is used to validate the standard claims of the
token (aud, iss, sub, exp, nbf, iat) (optional)
:token-claims - a map of expected claims and how to validate them as function
that takes the claim value (optional)

This mixin should only be used once.
sourceraw docstring

with-jws-access-token-mixinclj

(with-jws-access-token-mixin)
source

with-www-authenticateclj

(with-www-authenticate)

Returns a mixin that populates the WWW-Authenticate error when the request is not authorised to access the protected endpoint.

This mixin should only be used once.

Returns a mixin that populates the WWW-Authenticate error when the
request is not authorised to access the protected endpoint.

This mixin should only be used once.
sourceraw docstring

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

× close