object Principal
- Alphabetic
- By Inheritance
- Principal
- AnyRef
- Any
- Hide All
- Show All
- Public
- Protected
Type Members
- sealed abstract class AuthenticateStatus extends AnyRef
If unable to authenticate then it will be shown why as a subtype of this.
- final case class AuthenticationToken(username: String, token: ByteString, ttl: FiniteDuration) extends Product with Serializable
Describes an authentication token.
Describes an authentication token. Tokens have leases expressed as durations.
- username
the username used to acquire the token
- token
an opaque token
- ttl
a duration declaring how long the token is valid for
- final case class AuthenticationTokenRetrieved(token: AuthenticationToken) extends SuccessResponse with Product with Serializable
A successful authentication token reply.
A successful authentication token reply. Do not cache as it is subject to invalidation
- token
the token
- final case class AuthorizedSecret(value: String, ttl: FiniteDuration) extends Product with Serializable
Describes a secret.
Describes a secret.
- value
The value representing a secret
- ttl
a duration declaring how long the secret is valid for
- sealed abstract class FailureResponse extends Response
Classifies failure responses for requests on a Principal
- type GetAuthenticationToken = () => Future[Either[FailureResponse, AuthenticationTokenRetrieved]]
A function type to return authentication tokens
- type GetSecret = (Path) => Future[Either[FailureResponse, SecretRetrieved]]
A function type to return secrets
- sealed abstract class GetSecretStatus extends AnyRef
If a secret is unable to be returned then it will shown why as a subtype of this.
- type InvalidateSecret = (Path) => Future[Done]
A function type to invalidate secrets
- type Path = String
The path based address of the secret.
The path based address of the secret. A path may contain a namespace which is denoted by a "/". For example, a path of "my.ns/my.secret" refers to a secret of "my.secret" in the "my.ns" namespace.
- type PutSecret = (Path, String) => Future[Either[FailureResponse, SecretStored.type]]
A function type to store secrets
- sealed abstract class PutSecretStatus extends AnyRef
If a secret is unable to be set then it will shown why as a subtype of this.
- type RemoveSecret = (Path) => Future[Either[FailureResponse, SecretRemoved.type]]
A function type to remove secrets
- sealed abstract class RemoveSecretStatus extends AnyRef
If a secret is unable to be removed then it will be shown why as a subtype of this.
- sealed abstract class Response extends AnyRef
Denotes all response types for requests on a Principal
- final case class SecretRetrieved(secret: AuthorizedSecret) extends SuccessResponse with Product with Serializable
A successful secret reply.
A successful secret reply. Do not cache as it is subject to invalidation
- secret
the secret
- sealed abstract class SuccessResponse extends Response
For all successful responses on a Principal
- final case class Unauthorized(path: Path) extends FailureResponse with Product with Serializable
The principal does not have the rights to perform the request
Value Members
- final def !=(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
- final def ##: Int
- Definition Classes
- AnyRef → Any
- final def ==(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
- def apply(getAuthenticationToken: GetAuthenticationToken, getSecret: GetSecret, invalidateSecret: InvalidateSecret, putSecret: PutSecret, removeSecret: RemoveSecret): Principal
Constructs a new
Principal
containing the provided functions - final def asInstanceOf[T0]: T0
- Definition Classes
- Any
- def clone(): AnyRef
- Attributes
- protected[lang]
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.CloneNotSupportedException]) @native()
- final def eq(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
- def equals(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef → Any
- def finalize(): Unit
- Attributes
- protected[lang]
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.Throwable])
- final def getClass(): Class[_ <: AnyRef]
- Definition Classes
- AnyRef → Any
- Annotations
- @native()
- def hashCode(): Int
- Definition Classes
- AnyRef → Any
- Annotations
- @native()
- final def isInstanceOf[T0]: Boolean
- Definition Classes
- Any
- final def ne(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
- final def notify(): Unit
- Definition Classes
- AnyRef
- Annotations
- @native()
- final def notifyAll(): Unit
- Definition Classes
- AnyRef
- Annotations
- @native()
- final def synchronized[T0](arg0: => T0): T0
- Definition Classes
- AnyRef
- def toJava[A, B, C](func: (A, B) => Future[Either[FailureResponse, C]]): BiFunction[A, B, CompletionStage[Either[FailureResponse, C]]]
Converts the supplied two-argument function to a
BiFunction
that integrates with Java APIs.Converts the supplied two-argument function to a
BiFunction
that integrates with Java APIs.Converts:
- Principal#putSecret
- def toJava[A, B](func: (A) => Future[Either[FailureResponse, B]]): Function[A, CompletionStage[Either[FailureResponse, B]]]
Converts the supplied one-argument function to a
Function
that integrates with Java APIs.Converts the supplied one-argument function to a
Function
that integrates with Java APIs.Converts:
- Principal#getSecret
- Principal#removeSecret
- def toJava[A](func: () => Future[Either[FailureResponse, A]]): Supplier[CompletionStage[Either[FailureResponse, A]]]
Converts the supplied zero-argument function into a
Supplier
that integrates with Java APIs.Converts the supplied zero-argument function into a
Supplier
that integrates with Java APIs.Converts:
- Principal#getAuthenticatedSecret
- def toString(): String
- Definition Classes
- AnyRef → Any
- final def wait(): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.InterruptedException])
- final def wait(arg0: Long, arg1: Int): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.InterruptedException])
- final def wait(arg0: Long): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.InterruptedException]) @native()
- case object AuthenticationAttemptRejected extends AuthenticateStatus with Product with Serializable
Unable to authenticate because attempt was rejected.
- case object SecretRemoved extends SuccessResponse with Product with Serializable
A secret was successfully removed.
- case object SecretStored extends SuccessResponse with Product with Serializable
A successful secret store reply.
- case object Unauthenticated extends FailureResponse with Product with Serializable
The request cannot be fulfilled because the principal is not yet authenticated
- case object UnauthenticatedGetSecretAccess extends GetSecretStatus with Product with Serializable
A secret is unable to be retrieved given no authentication
- case object UnauthenticatedPutSecretAccess extends PutSecretStatus with Product with Serializable
A secret is unable to be stored given no authentication
- case object UnauthenticatedRemoveSecretAccess extends RemoveSecretStatus with Product with Serializable
A secret is unable to be removed given no authentication
- case object UnauthorizedGetSecretAccess extends GetSecretStatus with Product with Serializable
A secret is unable to be retrieved given inadequate authorization
- case object UnauthorizedPutSecretAccess extends PutSecretStatus with Product with Serializable
A secret is unable to be stored given inadequate authorization
- case object UnauthorizedRemoveSecretAccess extends RemoveSecretStatus with Product with Serializable
A secret is unable to be removed given inadequate authorization.