OAuthExtension
An actor implementation supporting an OAuth flow when interacting with an HTTP server.
This actor class wraps an com.github.cloudfiles.core.http.HttpRequestSender actor and adds a bearer token obtained from an OAuth identity provider to HTTP requests. The actor is configured with the parameters of an OAuth identity provider. When a request arrives, an authorization header with the current access token is added before the request is forwarded to the actual HTTP request actor. If the response has status code 401 (indicating that the access token is no longer valid), a request to refresh the token is sent to the IDP. The access token is then updated.
Token refresh operations and their outcome can be monitored, so that clients can take additional actions, e.g. store a new access token for later reuse.
Attributes
- Graph
-
- Supertypes
-
class Objecttrait Matchableclass Any
- Self type
-
OAuthExtension.type