(auth-header bearer)
Return a map with "authorization" key and value the access token with "Bearer " prefix. Argument is the data structure returned by the keycloak.authn/authenticate
function
Return a map with "authorization" key and value the access token with "Bearer " prefix. Argument is the data structure returned by the `keycloak.authn/authenticate` function
(authenticate {:keys [auth-server-url realm client-id] :as conf} client-secret)
(authenticate {:keys [auth-server-url realm client-id] :as conf}
username
password)
(authenticate auth-server-url realm client-id client-secret)
(authenticate auth-server-url realm client-id username password)
Return the bearer token decoded as a clojure map with :access_token
and :refresh_token
keys, beware underscore _
not hyphen -
.
Also contains the :expires_in
and :refresh_expires_in
values of token duration in seconds.
The keycloak conf needs the :auth-server-url
, realm
and client-id
keys
Return the bearer token decoded as a clojure map with `:access_token` and `:refresh_token` keys, beware underscore `_` not hyphen `-`. Also contains the `:expires_in` and `:refresh_expires_in` values of token duration in seconds. The keycloak conf needs the `:auth-server-url`, `realm` and `client-id` keys
(client-credentials client-id client-secret)
(client-credentials client-id username password)
(near-expiration? token-store username)
Does the token from the token-store
expires in less than 20 seconds?
Does the token from the `token-store` expires in less than 20 seconds?
(token! token-store keycloak-conf username password)
Given a map in an atom as a token store, issue, cache and re-issue a token from a keycloak with a username and password.
Swap the map entry with the username
key with this function result (actually the same response as the keycloak.authn/authenticate
function)
Given a map in an atom as a token store, issue, cache and re-issue a token from a keycloak with a username and password. Swap the map entry with the `username` key with this function result (actually the same response as the `keycloak.authn/authenticate` function)
cljdoc is a website building & hosting documentation for Clojure/Script libraries
× close