Liking cljdoc? Tell your friends :D

identify.ring

OpenID Connect 1.0 Client

Implements the Code Flow (OAuth2 Authorization Code Grant) for OpenID Relying Parties (RP). Provides a pluggable API using Ring handlers and Ring middleware.

Flow:

  • User Agent requests the authentication endpoint
  • Client resolves the OpenID Provider (OP) to use and validates the request
  • Client runs the :authentication-hook
  • Client redirects User Agent to Provider
  • Provider authenticates user and redirects the User Agent to the callback endpoint
  • Client validates the request and prepares to fetch tokens
  • Client runs the :authorization-code-hook
  • Client requests tokens at the Provider
  • Provider responds with tokens
  • Client validates the response and the ID token
  • Client runs the :token-hook
  • Client requests user info at the Provider
  • Provider responds with user info
  • Client validates the response and the user info
  • Clients runs the :userinfo-hook
  • Client redirects the User Agent to the completion URI

Hooks: :authentication-hook :authorization-code-hook :token-hook :userinfo-hook

Handlers: :authentication-response-handler :callback-response-handler :error-handler

See: https://openid.net/specs/openid-connect-basic-1_0.html

OpenID Connect 1.0 Client

Implements the Code Flow (OAuth2 Authorization Code Grant) for OpenID
Relying Parties (RP).  Provides a pluggable API using Ring handlers
and Ring middleware.

Flow:
- User Agent requests the authentication endpoint
- Client resolves the OpenID Provider (OP) to use and validates the
  request
- Client runs the :authentication-hook
- Client redirects User Agent to Provider
- Provider authenticates user and redirects the User Agent to the
  callback endpoint
- Client validates the request and prepares to fetch tokens
- Client runs the :authorization-code-hook
- Client requests tokens at the Provider
- Provider responds with tokens
- Client validates the response and the ID token
- Client runs the :token-hook
- Client requests user info at the Provider
- Provider responds with user info
- Client validates the response and the user info
- Clients runs the :userinfo-hook
- Client redirects the User Agent to the completion URI

Hooks:
  :authentication-hook
  :authorization-code-hook
  :token-hook
  :userinfo-hook

Handlers:
  :authentication-response-handler
  :callback-response-handler
  :error-handler

See: https://openid.net/specs/openid-connect-basic-1_0.html
raw docstring

authentication-response-handlerclj

(authentication-response-handler {:keys [session] :or {session {}} :as request}
                                 respond
                                 _raise)

Redirects the user agent to the provider's authorization endpoint to begin the Code Flow.

Redirects the user agent to the provider's authorization endpoint to
begin the Code Flow.
raw docstring

completion-handlerclj

(completion-handler {:identify.ring/keys [provider] :as request} respond _raise)

Redirects the user agent to the configured completion URI. Used by the callback handler to complete the flow, but can also be used by hooks to skip authentication.

Redirects the user agent to the configured completion URI.  Used by the
callback handler to complete the flow, but can also be used by hooks
to skip authentication.
raw docstring

defaultsclj


make-authenticate-handlerclj

(make-authenticate-handler provider)

Returns an asynchronous ring handler to authenticate the end-user.

Returns an asynchronous ring handler to authenticate the end-user.
raw docstring

make-callback-handlerclj

(make-callback-handler provider)

Returns an asynchronous ring handler to handle callbacks in the Code Flow.

Returns an asynchronous ring handler to handle callbacks in the Code
Flow.
raw docstring

providerclj

(provider opts)

Creates a new provider configuration for the given options.

Creates a new provider configuration for the given options.
raw docstring

provider-requestclj

(provider-request request provider)

wrap-oidcclj

(wrap-oidc handler profiles)

Middleware that includes routing to authentication and callback handlers, similar to ring-oauth2.

Middleware that includes routing to authentication and callback
handlers, similar to ring-oauth2.
raw docstring

wrap-providerclj

(wrap-provider handler provider)

Middleware making the provider available in the request, and converting synchronous handlers to asynchronous ones.

Middleware making the provider available in the request, and converting
synchronous handlers to asynchronous ones.
raw docstring

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

× close