Liking cljdoc? Tell your friends :D

oidc-provider.token-endpoint

Token endpoint implementation for OAuth2/OIDC.

Token endpoint implementation for OAuth2/OIDC.
raw docstring

handle-authorization-code-grantclj

(handle-authorization-code-grant {:keys [code redirect_uri code_verifier]}
                                 client
                                 provider-config
                                 code-store
                                 token-store
                                 claims-provider)

Handles authorization_code grant type.

Args: params: Token request parameters client: Authenticated client configuration provider-config: Provider configuration map code-store: AuthorizationCodeStore implementation token-store: TokenStore implementation claims-provider: ClaimsProvider implementation

Returns: Token response map

Handles authorization_code grant type.

Args:
  params: Token request parameters
  client: Authenticated client configuration
  provider-config: Provider configuration map
  code-store: AuthorizationCodeStore implementation
  token-store: TokenStore implementation
  claims-provider: ClaimsProvider implementation

Returns:
  Token response map
raw docstring

handle-client-credentials-grantclj

(handle-client-credentials-grant {:keys [scope resource]}
                                 client
                                 provider-config
                                 token-store)

Handles client_credentials grant type.

Args: params: Token request parameters client: Authenticated client configuration provider-config: Provider configuration map token-store: TokenStore implementation

Returns: Token response map

Handles client_credentials grant type.

Args:
  params: Token request parameters
  client: Authenticated client configuration
  provider-config: Provider configuration map
  token-store: TokenStore implementation

Returns:
  Token response map
raw docstring

handle-refresh-token-grantclj

(handle-refresh-token-grant {:keys [refresh_token scope resource]}
                            client
                            provider-config
                            token-store)

Handles refresh_token grant type.

Args: params: Token request parameters client: Authenticated client configuration provider-config: Provider configuration map token-store: TokenStore implementation

Returns: Token response map

Handles refresh_token grant type.

Args:
  params: Token request parameters
  client: Authenticated client configuration
  provider-config: Provider configuration map
  token-store: TokenStore implementation

Returns:
  Token response map
raw docstring

handle-token-requestclj

(handle-token-request params
                      authorization-header
                      provider-config
                      client-store
                      code-store
                      token-store
                      claims-provider)

Handles token endpoint requests.

Takes the parsed params map (as produced by Ring's wrap-params and wrap-keyword-params middleware), the authorization-header for client authentication, and the usual provider stores. Multi-value resource parameters (RFC 8707) should already be present in params as a string or vector — Ring's wrap-params handles this automatically for repeated form fields. Validates the request, authenticates the client, and dispatches to the appropriate grant handler. Returns a token response map. Throws ex-info on validation or processing errors.

Handles token endpoint requests.

Takes the parsed `params` map (as produced by Ring's `wrap-params` and
`wrap-keyword-params` middleware), the `authorization-header` for client
authentication, and the usual provider stores. Multi-value `resource`
parameters (RFC 8707) should already be present in `params` as a string or
vector — Ring's `wrap-params` handles this automatically for repeated form
fields. Validates the request, authenticates the client, and dispatches to
the appropriate grant handler. Returns a token response map. Throws `ex-info`
on validation or processing errors.
raw docstring

token-error-responseclj

(token-error-response error
                      error-description
                      &
                      {:keys [status] :or {status 400}})

Creates an OAuth2 error response.

Args: error: Error code (e.g., "invalid_request", "invalid_client") error-description: Human-readable error description status: HTTP status code (default 400)

Returns: Map with :status, :headers, and :body

Creates an OAuth2 error response.

Args:
  error: Error code (e.g., "invalid_request", "invalid_client")
  error-description: Human-readable error description
  status: HTTP status code (default 400)

Returns:
  Map with :status, :headers, and :body
raw docstring

TokenRequestclj

Malli schema for token request parameters.

Malli schema for token request parameters.
raw docstring

TokenResponseclj

Malli schema for token response.

Malli schema for token response.
raw docstring

cljdoc builds & hosts documentation for Clojure/Script libraries

Keyboard shortcuts
Ctrl+kJump to recent docs
Move to previous article
Move to next article
Ctrl+/Jump to the search field
× close