TeslaOAuth2ClientAuth (tesla_oauth2_client_auth v1.0.0) View Source
Tesla middlewares for OAuth2 and OpenID Connect client authentication
Support
Method | Implementation | Protocol |
---|---|---|
"none" | TeslaOAuth2ClientAuth.None | OAuth2 |
"client_secret_basic" | TeslaOAuth2ClientAuth.ClientSecretBasic | OAuth2 |
"client_secret_post" | TeslaOAuth2ClientAuth.ClientSecretPost | OAuth2 |
"client_secret_jwt" | TeslaOAuth2ClientAuth.ClientSecretJWT | OpenID Connect |
"private_key_jwt" | TeslaOAuth2ClientAuth.PrivateKeyJWT | OpenID Connect |
Note that Tesla
does not support modifying TLS parameters in middlewares, which is
why "tls_client_auth"
and "self_signed_tls_client_auth"
are unsupported.
Options
A TeslaOAuth2ClientAuth
middleware receives a opts/0
as an option, which contains:
- the client configuration (
:client_config
, seeclient_config/0
) - the OAuth2 or OpenID Connect server metadata (
:server_metadata
) - any other option as documented by the implementations
Link to this section Summary
Types
Client configuration is a map whose keys are those documented in OpenID Connect Dynamic Client Registration 1.0 incorporating errata set 1.
OAuth2 or OpenID Connect server metadata as documented in one of
Functions
Returns the Elixir.TeslaOAuth2ClientAuth
middleware for client authentication from client configuration
(using the "token_endpoint_auth_method"
configuration field) or an authentication method
string
Returns the Elixir.TeslaOAuth2ClientAuth
middleware for client authentication from client configuration
(using the "token_endpoint_auth_method"
configuration field) or an authentication method
string
Link to this section Types
Specs
Client configuration is a map whose keys are those documented in OpenID Connect Dynamic Client Registration 1.0 incorporating errata set 1.
Must at least contain the "client_id"
field of the client.
Specs
opts() :: %{ :client_config => client_config(), optional(:server_metadata) => server_metadata(), optional(atom()) => any() }
Specs
OAuth2 or OpenID Connect server metadata as documented in one of:
Link to this section Functions
Specs
implementation(client_config() | (token_endpoint_auth_method :: String.t())) :: {:ok, module()} | {:error, TeslaOAuth2ClientAuth.UnsupportedClientAuthenticationMethod.t()}
Returns the Elixir.TeslaOAuth2ClientAuth
middleware for client authentication from client configuration
(using the "token_endpoint_auth_method"
configuration field) or an authentication method
string
Specs
implementation!(client_config() | (token_endpoint_auth_method :: String.t())) :: module() | no_return()
Returns the Elixir.TeslaOAuth2ClientAuth
middleware for client authentication from client configuration
(using the "token_endpoint_auth_method"
configuration field) or an authentication method
string