tesla_oauth2_client_auth v0.1.0 TeslaOAuth2ClientAuth 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 id (
:client_id
), mandatory - 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
Client configuration is a map whose keys are those documented in OpenID Connect Dynamic Client Registration 1.0 incorporating errata set 1.
opts()
View Sourceopts() :: %{ :client_id => String.t(), :client_config => client_config(), :server_metadata => server_metadata(), optional(atom()) => any() }
OAuth2 or OpenID Connect server metadata as documented in one of:
Link to this section Functions
implementation(config)
View Sourceimplementation(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
implementation!(conf_or_method)
View Sourceimplementation!(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