Liking cljdoc? Tell your friends :D

fahrscheine-bitte.core


check-consented-scopesclj

(check-consented-scopes tokeninfo required-scopes)

Checks if every scope is mentioned in the 'scope' attribute of the token info: {"scope" ["read" "write"]}

Checks if every scope is mentioned in the 'scope' attribute of the token info:
{"scope" ["read" "write"]}
sourceraw docstring

check-corresponding-attributesclj

(check-corresponding-attributes tokeninfo required-scopes)

Checks if every scope has a truthy attribute in the token info of the same name: {"read": true, "write": true}

Checks if every scope has a truthy attribute in the token info of the same name:
{"read": true, "write": true}
sourceraw docstring

explain-reason-codeclj

source

extract-access-tokenclj

(extract-access-token request)

Extracts the Bearer token from the Authorization header.

Extracts the Bearer token from the Authorization header.
sourceraw docstring

fetch-tokeninfoclj

source

make-cached-access-token-resolverclj

(make-cached-access-token-resolver
  tokeninfo-url
  {:keys [ttl-ms max-size client-middleware]
   :or {ttl-ms 120000 max-size 100 client-middleware identity}})
source

make-oauth2-s1st-security-handlerclj

(make-oauth2-s1st-security-handler access-token-resolver-fn scope-checker-fn)

Returns a swagger1st security handler that checks OAuth 2.0 tokens.

Returns a swagger1st security handler that checks OAuth 2.0 tokens.
* access-token-resolver-fn takes a token and returns tokeninfo: https://tools.ietf.org/html/rfc7662#section-2.2
* scope-checker-fn takes tokeninfo and requirements and returns true if scopes in the tokeninfo match the requirements
sourceraw docstring

make-wrap-oauth2-token-verifierclj

(make-wrap-oauth2-token-verifier access-token-resolver-fn)

Returns a swagger1st security handler that checks OAuth 2.0 tokens.

Returns a swagger1st security handler that checks OAuth 2.0 tokens.
* access-token-resolver-fn takes a token and returns tokeninfo: https://tools.ietf.org/html/rfc7662#section-2.2
sourceraw docstring

wrap-log-auth-errorclj

(wrap-log-auth-error next-handler logger-fn)
source

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

× close