(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"]}
(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}
(extract-access-token request)
Extracts the Bearer token from the Authorization header.
Extracts the Bearer token from the Authorization header.
(make-cached-access-token-resolver
tokeninfo-url
{:keys [ttl-ms max-size client-middleware]
:or {ttl-ms 120000 max-size 100 client-middleware identity}})
(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
(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
cljdoc is a website building & hosting documentation for Clojure/Script libraries
× close