com.github.cloudfiles.core.http.auth

Members list

Type members

Classlikes

sealed trait AuthConfig

A trait representing a configuration for an authentication mechanism.

A trait representing a configuration for an authentication mechanism.

This is just a marker interface. Concrete implementations define their own specific properties.

Attributes

Supertypes
class Object
trait Matchable
class Any
Known subtypes
object NoAuthConfig.type
class OAuthConfig
case class BasicAuthConfig(user: String, password: Secret) extends AuthConfig

A data class that collects user credentials for accessing a server via basic auth.

A data class that collects user credentials for accessing a server via basic auth.

Value parameters

password

the password

user

the user name

Attributes

Supertypes
trait Serializable
trait Product
trait Equals
trait AuthConfig
class Object
trait Matchable
class Any
Show all

An actor implementation that adds basic authentication to HTTP requests.

An actor implementation that adds basic authentication to HTTP requests.

Based on the given configuration, a proper ''Authorization'' header is added to HTTP requests before they are forwarded to the actual actor responsible for sending requests.

Attributes

Supertypes
class Object
trait Matchable
class Any
Self type
case object NoAuthConfig extends AuthConfig

An object representing a dummy configuration for the case that no authentication is needed.

An object representing a dummy configuration for the case that no authentication is needed.

Attributes

Supertypes
trait Singleton
trait Product
trait Mirror
trait Serializable
trait Product
trait Equals
trait AuthConfig
class Object
trait Matchable
class Any
Show all
Self type
object OAuthConfig

Attributes

Companion
class
Supertypes
trait Product
trait Mirror
class Object
trait Matchable
class Any
Self type
case class OAuthConfig(tokenEndpoint: String, redirectUri: String, clientID: String, clientSecret: Secret, initTokenData: OAuthTokenData, refreshNotificationFunc: TokenRefreshNotificationFunc) extends AuthConfig

A data class collecting the properties required for an OAuth client application.

A data class collecting the properties required for an OAuth client application.

An instance of this class stores the information required for obtaining an OAuth access token based on a refresh token from a specific OAuth2 identity provider.

Value parameters

clientID

the client ID

clientSecret

the secret to identify the client

initTokenData

an object with token information (the mandatory refresh token and a (possibly undefined) access token

redirectUri

the redirect URI

refreshNotificationFunc

a function to invoke when tokens are refreshed

tokenEndpoint

the URI of the token endpoint

Attributes

Companion
object
Supertypes
trait Serializable
trait Product
trait Equals
trait AuthConfig
class Object
trait Matchable
class Any
Show all

An actor implementation supporting an OAuth flow when interacting with an HTTP server.

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

Supertypes
class Object
trait Matchable
class Any
Self type

Attributes

Companion
class
Supertypes
trait Product
trait Mirror
class Object
trait Matchable
class Any
Self type
case class OAuthTokenData(accessToken: String, refreshToken: String)

A data class representing the token material to be stored for a single OAuth client of a specific identity provider.

A data class representing the token material to be stored for a single OAuth client of a specific identity provider.

Value parameters

accessToken

the access token

refreshToken

the refresh token

Attributes

Companion
object
Supertypes
trait Serializable
trait Product
trait Equals
class Object
trait Matchable
class Any
Show all