Liking cljdoc? Tell your friends :D

keycloak.authn


access-tokenclj

(access-token client username password)
source

(auth-cookie bearer)
source

auth-headerclj

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

authenticateclj

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

client-credentialsclj

(client-credentials client-id client-secret)
(client-credentials client-id username password)
source

near-expiration?clj

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

oidc-connect-urlclj

(oidc-connect-url auth-server-url realm-name)
source

token!clj

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

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

× close