Class Credentials.Provided
- java.lang.Object
-
- akka.http.scaladsl.server.directives.Credentials.Provided
-
- All Implemented Interfaces:
Credentials
,java.io.Serializable
,scala.Equals
,scala.Product
- Enclosing interface:
- Credentials
public abstract static class Credentials.Provided extends java.lang.Object implements Credentials, scala.Product, java.io.Serializable
- See Also:
- Serialized Form
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from interface akka.http.scaladsl.server.directives.Credentials
Credentials.Missing$, Credentials.Provided, Credentials.Provided$
-
-
Constructor Summary
Constructors Constructor Description Provided(java.lang.String identifier)
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description java.lang.String
identifier()
boolean
provideVerify(java.lang.String secret, scala.Function2<java.lang.String,java.lang.String,java.lang.Object> verifier)
Compares with custom 'verifier' and the passed secret with the received secret part of the Credentials.abstract boolean
provideVerify(scala.Function1<java.lang.String,java.lang.Object> verifier)
Compares with custom 'verifier' the received secret part of the Credentials.boolean
verify(java.lang.String secret)
Safely compares the passed insecret
with the received secret part of the Credentials.abstract boolean
verify(java.lang.String secret, scala.Function1<java.lang.String,java.lang.String> hasher)
First applies the passed inhasher
function to the received secret part of the Credentials and then safely compares the passed insecret
with the hashed received secret.
-
-
-
Method Detail
-
identifier
public java.lang.String identifier()
-
verify
public abstract boolean verify(java.lang.String secret, scala.Function1<java.lang.String,java.lang.String> hasher)
First applies the passed inhasher
function to the received secret part of the Credentials and then safely compares the passed insecret
with the hashed received secret. This method can be used if the secret is not stored in plain text. Use of this method instead of manual String equality testing is recommended in order to guard against timing attacks.See also {@link EnhancedString#secure_==}, for more information.
- Parameters:
secret
- (undocumented)hasher
- (undocumented)- Returns:
- (undocumented)
-
verify
public boolean verify(java.lang.String secret)
Safely compares the passed insecret
with the received secret part of the Credentials. Use of this method instead of manual String equality testing is recommended in order to guard against timing attacks.See also {@link EnhancedString#secure_==}, for more information.
- Parameters:
secret
- (undocumented)- Returns:
- (undocumented)
-
provideVerify
public abstract boolean provideVerify(scala.Function1<java.lang.String,java.lang.Object> verifier)
Compares with custom 'verifier' the received secret part of the Credentials. Use of this method only if custom String equality testing is required, not recommended.- Parameters:
verifier
- (undocumented)- Returns:
- (undocumented)
-
provideVerify
public boolean provideVerify(java.lang.String secret, scala.Function2<java.lang.String,java.lang.String,java.lang.Object> verifier)
Compares with custom 'verifier' and the passed secret with the received secret part of the Credentials. Use of this method only if custom String equality testing is required, not recommended.- Parameters:
secret
- (undocumented)verifier
- (undocumented)- Returns:
- (undocumented)
-
-