Class SecurityDirectives.ProvidedCredentials
- java.lang.Object
-
- akka.http.javadsl.server.directives.SecurityDirectives.ProvidedCredentials
-
- All Implemented Interfaces:
java.io.Serializable
,scala.Equals
,scala.Product
- Enclosing class:
- SecurityDirectives
public static class SecurityDirectives.ProvidedCredentials extends java.lang.Object implements scala.Product, java.io.Serializable
Represents HTTP Basic or OAuth2 authentication credentials supplied with a request.- See Also:
- Serialized Form
-
-
Constructor Summary
Constructors Constructor Description ProvidedCredentials(Credentials.Provided asScala)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.lang.String
identifier()
The username or token provided with the credentialsboolean
verify(java.lang.String secret)
Safely compares the passed insecret
with the received secret part of the Credentials.
-
-
-
Constructor Detail
-
ProvidedCredentials
public ProvidedCredentials(Credentials.Provided asScala)
-
-
Method Detail
-
identifier
public java.lang.String identifier()
The username or token provided with the credentials- 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 akka.http.impl.util.EnhancedString#secure_==}, for more information.
- Parameters:
secret
- (undocumented)- Returns:
- (undocumented)
-
-