scalaoauth2

provider

package provider

Visibility
  1. Public
  2. All

Type Members

  1. class AccessDenied extends OAuthError

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

    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. trait AccessTokenFetcher extends AnyRef

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

    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.

  5. class AuthorizationCode extends GrantHandler

  6. case class AuthorizationRequest(headers: Map[String, Seq[String]], params: Map[String, Seq[String]]) extends RequestBase with Product with Serializable

  7. case class ClientCredential(clientId: String, clientSecret: Option[String]) extends Product with Serializable

  8. trait ClientCredentialFetcher extends AnyRef

  9. class ClientCredentials extends GrantHandler

  10. trait DataHandler[U] extends AnyRef

    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(clientCredential, grantType)
    • findAuthInfoByCode(code)
    • getStoredAccessToken(authInfo)
    • isAccessTokenExpired(token)
    • refreshAccessToken(authInfo, token)
    • createAccessToken(authInfo)
    Refresh Token Grant
    • validateClient(clientCredential, grantType)
    • findAuthInfoByRefreshToken(refreshToken)
    • refreshAccessToken(authInfo, refreshToken)
    Resource Owner Password Credentials Grant
    • validateClient(clientCredential, grantType)
    • findUser(username, password)
    • getStoredAccessToken(authInfo)
    • isAccessTokenExpired(token)
    • refreshAccessToken(authInfo, token)
    • createAccessToken(authInfo)
    Client Credentials Grant
    • validateClient(clientCredential, grantType)
    • findClientUser(clientCredential)
    • getStoredAccessToken(authInfo)
    • isAccessTokenExpired(token)
    • refreshAccessToken(authInfo, token)
    • createAccessToken(authInfo)
    [Access to Protected Resource phase]
    • findAccessToken(token)
    • isAccessTokenExpired(token)
    • findAuthInfoByAccessToken(token)
  11. class ExpiredToken extends OAuthError

  12. case class FetchResult(token: String, params: Map[String, String]) extends Product with Serializable

  13. trait GrantHandler extends AnyRef

  14. case class GrantHandlerResult(tokenType: String, accessToken: String, expiresIn: Option[Long], refreshToken: Option[String], scope: Option[String]) extends Product with Serializable

  15. class InsufficientScope extends OAuthError

  16. class InvalidClient extends OAuthError

  17. class InvalidGrant extends OAuthError

  18. class InvalidRequest extends OAuthError

  19. class InvalidScope extends OAuthError

  20. class InvalidToken extends OAuthError

  21. abstract class OAuthError extends Exception

  22. class Password extends GrantHandler

  23. trait ProtectedResource extends AnyRef

  24. case class ProtectedResourceRequest(headers: Map[String, Seq[String]], params: Map[String, Seq[String]]) extends RequestBase with Product with Serializable

  25. class RedirectUriMismatch extends OAuthError

  26. class RefreshToken extends GrantHandler

  27. class RequestBase extends AnyRef

  28. trait TokenEndpoint extends AnyRef

  29. class UnauthorizedClient extends OAuthError

  30. class UnsupportedGrantType extends OAuthError

  31. class UnsupportedResponseType extends OAuthError

Ungrouped