Class SecurityDirectives.ProvidedCredentials

java.lang.Object
akka.http.javadsl.server.directives.SecurityDirectives.ProvidedCredentials
All Implemented Interfaces:
Serializable, scala.Equals, scala.Product
Enclosing class:
SecurityDirectives

public static class SecurityDirectives.ProvidedCredentials extends Object implements scala.Product, Serializable
Represents HTTP Basic or OAuth2 authentication credentials supplied with a request.
See Also:
  • Constructor Summary

    Constructors
    Constructor
    Description
     
  • Method Summary

    Modifier and Type
    Method
    Description
    The username or token provided with the credentials
    boolean
    verify(String secret)
    Safely compares the passed in secret with the received secret part of the Credentials.

    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

  • Method Details

    • identifier

      public String identifier()
      The username or token provided with the credentials
      Returns:
      (undocumented)
    • verify

      public boolean verify(String secret)
      Safely compares the passed in secret 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)