com.malliina.web

Type members

Classlikes

case class AuthCodeConf(brandName: String, conf: AuthConf, client: KeyClient, extraStartParams: Map[String, String], extraValidateParams: Map[String, String])
case class AuthConf(clientId: ClientId, clientSecret: ClientSecret)
case class AuthEndpoints(authorizationEndpoint: FullUrl, tokenEndpoint: FullUrl, jwksUri: FullUrl) extends OpenIdConf
Companion:
object
Companion:
class
sealed abstract class AuthError(val key: String)
trait AuthFlow[F[_], U] extends FlowStart[F] with CallbackValidator[U]
case class Callback(requestState: Option[String], sessionState: Option[String], codeQuery: Option[String], requestNonce: Option[String], redirectUrl: FullUrl)
Companion:
class
Companion:
object
trait ClaimKeys
final case class ClientId(value: String) extends AnyVal with WrappedString
Companion:
object
object ClientId extends StringCompanion[ClientId]
Companion:
class
final case class ClientSecret(value: String) extends AnyVal with WrappedString
Companion:
object
object ClientSecret extends StringCompanion[ClientSecret]
Companion:
class
final case class Code(code: String) extends AnyVal with WrappedString
Companion:
object
object Code extends StringCompanion[Code]
Companion:
class
class CognitoAccessValidator(keys: Seq[KeyConf], issuer: Issuer, clientId: ClientId) extends CognitoValidator[AccessToken, CognitoUser]
Companion:
class
class CognitoAuthFlow(host: String, identityProvider: IdentityProvider, validator: CognitoIdValidator, val oauth: GenericAuthConf) extends CallbackValidator[CognitoUser] with StaticFlowStart
Companion:
object
class CognitoIdValidator(keys: Seq[KeyConf], issuer: Issuer, val clientIds: Seq[ClientId]) extends CognitoValidator[IdToken, CognitoUser]
case class CognitoIdentityConf(clientId: String, domain: FullUrl, scope: String)
case class CognitoTokens(accessToken: AccessToken, idToken: IdToken, refreshToken: RefreshToken)
Companion:
object
Companion:
class
case class CognitoTokensJson(access_token: AccessToken, id_token: IdToken, refresh_token: RefreshToken)
Companion:
object
Companion:
class
case class CognitoUser(username: Username, email: Option[Email], groups: Seq[String], verified: Verified) extends JWTUser
case class CognitoValidation(issuer: Issuer, tokenUse: String, clientIdKey: String, clientId: ClientId)
Companion:
class
abstract class CognitoValidator[T <: TokenValue, U](keys: Seq[KeyConf], issuer: Issuer) extends StaticTokenValidator[T, U]
Companion:
object
abstract class DiscoveringAuthFlow[V](codeConf: AuthCodeConf) extends AuthFlow[IO, Verified]
Companion:
class
class EmailAuthFlow(conf: AuthCodeConf) extends StandardAuthFlow[Email]
Companion:
object
case class EmailResponse(email: Email)
Companion:
object
Companion:
class
object Execution
case class Expired(token: TokenValue, exp: Instant, now: Instant) extends JWTError
Companion:
class
class FacebookAuthFlow(authConf: AuthConf, http: HttpClient[IO]) extends StaticFlowStart with CallbackValidator[Email]
Companion:
object
case class FacebookTokens(accessToken: AccessToken, tokenType: String, expiresIn: Duration)
Companion:
object
Companion:
class
trait FlowStart[F[_]]
Companion:
class
class GitHubAuthFlow(authConf: AuthConf, http: HttpClient[IO]) extends StaticFlowStart with CallbackValidator[Email]
Companion:
object
case class GitHubEmail(email: Email, primary: Boolean, verified: Boolean, visibility: Option[String])
Companion:
object
Companion:
class
case class GitHubTokens(accessToken: AccessToken, tokenType: Option[String])
Companion:
object
Companion:
class
case class GitHubTokensJson(access_token: AccessToken, token_type: Option[String])
Companion:
object
Companion:
class
Companion:
class
class GoogleAuthFlow(conf: AuthCodeConf) extends DiscoveringAuthFlow[Email] with LoginHint[IO]
Companion:
object
case class GoogleTokens(idToken: IdToken, accessToken: AccessToken, expiresIn: Duration, tokenType: String) extends TokenSet
Companion:
object
Companion:
class
Companion:
class
class GoogleValidator(clientIds: Seq[ClientId], issuers: Seq[Issuer]) extends TokenValidator
Companion:
object
Companion:
class
Companion:
object
sealed abstract class IdentityProvider(val name: String)
Companion:
object
Companion:
class
case class InvalidClaims(token: TokenValue, message: ErrorMessage) extends JWTError
case class InvalidKeyId(token: TokenValue, kid: String, expected: Seq[String]) extends JWTError
case class InvalidSignature(token: TokenValue) extends JWTError
final case class Issuer(value: String) extends AnyVal with WrappedString
Companion:
object
object Issuer extends StringCompanion[Issuer]
Companion:
class
case class IssuerMismatch(token: TokenValue, actual: Issuer, allowed: Seq[Issuer]) extends JWTError
sealed abstract class JWTError(key: String) extends AuthError
case class JWTKeys(keys: Seq[KeyConf])
Companion:
object
object JWTKeys
Companion:
class
trait JWTUser
case class JsonError(err: String) extends AuthError
class KeyClient(val knownUrl: FullUrl, validator: TokenValidator, val http: HttpClient[IO])
case class KeyConf(n: Base64URL, kid: String, use: KeyUse, e: Base64URL, alg: JWSAlgorithm, kty: String)
Companion:
object
object KeyConf
Companion:
class
class LiberalValidator(conf: KeyConf, issuer: Issuer) extends StaticTokenValidator[AccessToken, Verified]

Accepts any claims, provides user as-is.

Accepts any claims, provides user as-is.

trait LoginHint[F[_]]
case class MicrosoftOAuthConf(authorizationEndpoint: FullUrl, tokenEndpoint: FullUrl, jwksUri: FullUrl, endSessionEndpoint: FullUrl, scopesSupported: Seq[String], issuer: Issuer, claimsSupported: Seq[String]) extends OpenIdConf
Companion:
object
Companion:
class
case class MicrosoftTokens(idToken: IdToken, accessToken: Option[AccessToken], refreshToken: Option[RefreshToken], tokenType: Option[String], expiresIn: Option[Duration], scope: Option[String]) extends TokenSet

https://docs.microsoft.com/en-us/azure/active-directory/develop/active-directory-v2-protocols-oauth-code

Value parameters:
expiresIn

seconds

idToken

only returned if scope "openid" is requested

refreshToken

only returned if scope "offline_access" is requested

tokenType

Bearer

Companion:
object
Companion:
class
Companion:
class
class MicrosoftValidator(clientIds: Seq[ClientId], issuer: Issuer) extends TokenValidator
Companion:
object
case class MissingData(token: TokenValue, message: ErrorMessage) extends JWTError
case class NotYetValid(token: TokenValue, nbf: Instant, now: Instant) extends JWTError
case class OAuthError(message: ErrorMessage) extends AuthError
Companion:
object
object OAuthError
Companion:
class
object OAuthKeys extends OAuthKeys
Companion:
class
trait OAuthKeys extends ClaimKeys
Companion:
object
case class OAuthParams(client: KeyClient, conf: AuthConf, extraStartParams: Map[String, String], extraValidateParams: Map[String, String])
case class OkError(error: ResponseError) extends AuthError
Companion:
object
object OkError
Companion:
class
case class ParseError(token: TokenValue, e: ParseException) extends JWTError
case class ParsedJWT(jwt: SignedJWT, claims: JWTClaimsSet, kid: String, iss: Issuer, exp: Instant, token: TokenValue)
case class PermissionError(message: ErrorMessage) extends AuthError
trait Readable[R]
Companion:
object
object Readable
Companion:
class
case class SimpleOpenIdConf(jwksUri: FullUrl) extends OpenIdConf
Companion:
object
Companion:
class
case class SimpleTokens(idToken: IdToken)
Companion:
object
Companion:
class
abstract class StandardAuthFlow[V](conf: AuthCodeConf) extends DiscoveringAuthFlow[V] with LoginHint[IO]
case class Start(authorizationEndpoint: FullUrl, params: Map[String, String], nonce: Option[String])
case class StaticConf(scope: String, authorizationEndpoint: FullUrl, tokenEndpoint: FullUrl, authConf: AuthConf)
trait StaticFlowStart extends FlowStart[IO]
Companion:
class
abstract class StaticTokenValidator[T <: TokenValue, U](keys: Seq[KeyConf], issuer: Issuer) extends TokenValidator
Type parameters:
T

type of token

U

type of user

Value parameters:
issuer

issuer

keys

public keys used to validate tokens

Companion:
object
trait TokenSet
abstract class TokenValidator(issuers: Seq[Issuer]) extends ClaimKeys
case class TwitterAccess(oauthToken: AccessToken, oauthTokenSecret: String)
Companion:
object
Companion:
class
Companion:
class
class TwitterAuthFlow(conf: AuthConf, val http: HttpClient[IO]) extends FlowStart[IO]
Companion:
object
case class TwitterTokens(oauthToken: AccessToken, oauthTokenSecret: String, oauthCallbackConfirmed: Boolean)
Companion:
object
Companion:
class
case class TwitterUser(id: String, name: String, screenName: String, email: Option[Email])
Companion:
object
Companion:
class
object Utils
case class Verified(parsed: ParsedJWT)
object WebHeaders extends WebHeaders
Companion:
class
Companion:
object