Class Credentials.Provided
java.lang.Object
akka.http.scaladsl.server.directives.Credentials.Provided
- All Implemented Interfaces:
Credentials
,Serializable
,scala.Equals
,scala.Product
- Enclosing interface:
- Credentials
public abstract static class Credentials.Provided
extends Object
implements Credentials, scala.Product, Serializable
- See Also:
-
Nested Class Summary
Nested classes/interfaces inherited from interface akka.http.scaladsl.server.directives.Credentials
Credentials.Missing$, Credentials.Provided, Credentials.Provided$
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionboolean
provideVerify
(String secret, scala.Function2<String, String, Object> verifier) Compares with custom 'verifier' and the passed secret with the received secret part of the Credentials.abstract boolean
provideVerify
(scala.Function1<String, Object> verifier) Compares with custom 'verifier' the received secret part of the Credentials.boolean
Safely compares the passed insecret
with the received secret part of the Credentials.abstract boolean
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.Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface scala.Equals
canEqual, equals
Methods inherited from interface scala.Product
productArity, productElement, productElementName, productElementNames, productIterator, productPrefix
-
Constructor Details
-
Provided
-
-
Method Details
-
identifier
-
verify
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
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
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
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)
-