Class 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
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      java.lang.String identifier()
      The username or token provided with the credentials
      boolean verify​(java.lang.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
    • 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 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)