Package

com.twitter.finagle

oauth2

Permalink

package oauth2

Visibility
  1. Public
  2. All

Type Members

  1. final class AccessDenied extends OAuthError

    Permalink
  2. final case class AccessToken(token: String, refreshToken: Option[String], scope: Option[String], expiresIn: Option[Long], createdAt: Date) extends Product with Serializable

    Permalink

    Access token.

    Access token.

    token

    Access token is used to authentication.

    refreshToken

    Refresh token is used to re-issue access token.

    scope

    Inform the client of the scope of the access token issued.

    expiresIn

    Expiration date of access token. Unit is seconds.

    createdAt

    Access token is created date.

  3. final case class AuthInfo[U](user: U, clientId: String, scope: Option[String], redirectUri: Option[String]) extends Product with Serializable

    Permalink

    Authorized information.

    Authorized information.

    user

    Authorized user which is registered on system.

    clientId

    Using client id which is registered on system.

    scope

    Inform the client of the scope of the access token issued.

    redirectUri

    This value is used by Authorization Code Grant.

  4. final case class ClientCredential(clientId: String, clientSecret: String) extends Product with Serializable

    Permalink
  5. trait DataHandler[U] extends AnyRef

    Permalink

    Provide accessing to data storage for using OAuth 2.0.

    Provide accessing to data storage for using OAuth 2.0.

    [Authorization phases]
    Authorization Code Grant
    • validateClient(clientId, clientSecret, grantType)
    • findAuthInfoByCode(code)
    • getStoredAccessToken(authInfo)
    • isAccessTokenExpired(token)
    • refreshAccessToken(authInfo, token)
    • createAccessToken(authInfo)
    Refresh Token Grant
    • validateClient(clientId, clientSecret, grantType)
    • findAuthInfoByRefreshToken(refreshToken)
    • refreshAccessToken(authInfo, refreshToken)
    Resource Owner Password Credentials Grant
    • validateClient(clientId, clientSecret, grantType)
    • findUser(username, password)
    • getStoredAccessToken(authInfo)
    • isAccessTokenExpired(token)
    • refreshAccessToken(authInfo, token)
    • createAccessToken(authInfo)
    Client Credentials Grant
    • validateClient(clientId, clientSecret, grantType)
    • findClientUser(clientId, clientSecret)
    • getStoredAccessToken(authInfo)
    • isAccessTokenExpired(token)
    • refreshAccessToken(authInfo, token)
    • createAccessToken(authInfo)
    [Access to Protected Resource phase]
    • findAccessToken(token)
    • isAccessTokenExpired(token)
    • findAuthInfoByAccessToken(token)
  6. final class ExpiredToken extends OAuthError

    Permalink
  7. sealed abstract class GrantHandler extends AnyRef

    Permalink
  8. final case class GrantResult(tokenType: String, accessToken: String, expiresIn: Option[Long], refreshToken: Option[String], scope: Option[String]) extends Product with Serializable

    Permalink
  9. final class InsufficientScope extends OAuthError

    Permalink
  10. final class InvalidClient extends OAuthError

    Permalink
  11. final class InvalidGrant extends OAuthError

    Permalink
  12. final class InvalidRequest extends OAuthError

    Permalink
  13. final class InvalidScope extends OAuthError

    Permalink
  14. final class InvalidToken extends OAuthError

    Permalink
  15. abstract class OAuthError extends Exception

    Permalink
  16. final class RedirectUriMismatch extends OAuthError

    Permalink
  17. sealed abstract class Request extends AnyRef

    Permalink
  18. final class UnauthorizedClient extends OAuthError

    Permalink
  19. final class UnsupportedGrantType extends OAuthError

    Permalink
  20. final class UnsupportedResponseType extends OAuthError

    Permalink

Value Members

  1. object GrantHandler

    Permalink
  2. object Request

    Permalink

Ungrouped