struct
Crabbit::OAuth2Config
- Crabbit::OAuth2Config
- Struct
- Value
- Object
Overview
OAuth 2 client-credentials and refresh settings.
The token endpoint must use HTTPS unless allow_insecure_transport is
explicitly enabled for isolated development. Stream endpoints must also use
TLS when this configuration is attached to Configuration.
Defined in:
crabbit/oauth2.crConstructors
Instance Method Summary
-
#allow_insecure_transport : Bool
Returns whether unencrypted token and Stream transports are permitted.
-
#client_id : String
Returns the OAuth 2 client identifier.
-
#client_secret : String
Returns the OAuth 2 client secret.
-
#connection_timeout : Time::Span
Returns the token-endpoint connection timeout.
-
#grant_type : String
Returns the requested grant type.
-
#parameters : Hash(String, String)
Returns additional form parameters included in token requests.
-
#refresh_ratio : Float64
Returns the fraction of token lifetime after which proactive refresh starts.
-
#refresh_retry_delay : Time::Span
Returns the first retry delay after refresh or re-authentication failure.
-
#refresh_retry_max_delay : Time::Span
Returns the maximum retry delay.
-
#request_timeout : Time::Span
Returns the token-endpoint read and write timeout.
-
#tls_context : OpenSSL::SSL::Context::Client | Nil
Returns the optional trust/client-certificate context for the token endpoint.
-
#token_endpoint : URI
Returns the parsed token endpoint URI.
Constructor Detail
Creates OAuth 2 settings.
parameters can carry provider-specific fields such as audience or
scope; Crabbit always adds grant_type. The HTTP provider uses Basic
client authentication and requires JSON containing access_token and a
positive expires_in.
Token refresh is scheduled after refresh_ratio of the advertised lifetime. Retrieval and live re-authentication failures use exponential backoff between refresh_retry_delay and refresh_retry_max_delay.
Instance Method Detail
Returns whether unencrypted token and Stream transports are permitted.
Returns additional form parameters included in token requests.
Returns the fraction of token lifetime after which proactive refresh starts.
Returns the first retry delay after refresh or re-authentication failure.
Returns the optional trust/client-certificate context for the token endpoint.