Class DigestAuthMechanism

java.lang.Object
org.restheart.security.mechanisms.DigestAuthMechanism
All Implemented Interfaces:
io.undertow.security.api.AuthenticationMechanism, ConfigurablePlugin, Plugin, AuthMechanism

public class DigestAuthMechanism extends Object implements AuthMechanism
HttpHandler to handle HTTP Digest authentication, both according to RFC-2617 and draft update to allow additional algorithms to be used.
Author:
Darran Lofthouse
  • Nested Class Summary

    Nested classes/interfaces inherited from interface io.undertow.security.api.AuthenticationMechanism

    io.undertow.security.api.AuthenticationMechanism.AuthenticationMechanismOutcome, io.undertow.security.api.AuthenticationMechanism.ChallengeResult
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    static final String
     
    static final String
     
  • Constructor Summary

    Constructors
    Constructor
    Description
     
    DigestAuthMechanism(String realmName, String domain, String mechanismName)
     
    DigestAuthMechanism(String realmName, String domain, String mechanismName, io.undertow.security.idm.IdentityManager identityManager)
     
    DigestAuthMechanism(String mechanismName, List<io.undertow.security.idm.DigestAlgorithm> supportedAlgorithms, List<io.undertow.security.impl.DigestQop> supportedQops, String realmName, String domain, io.undertow.security.api.NonceManager nonceManager)
     
    DigestAuthMechanism(List<io.undertow.security.idm.DigestAlgorithm> supportedAlgorithms, List<io.undertow.security.impl.DigestQop> supportedQops, String realmName, String domain, io.undertow.security.api.NonceManager nonceManager, String mechanismName)
     
    DigestAuthMechanism(List<io.undertow.security.idm.DigestAlgorithm> supportedAlgorithms, List<io.undertow.security.impl.DigestQop> supportedQops, String realmName, String domain, io.undertow.security.api.NonceManager nonceManager, String mechanismName, io.undertow.security.idm.IdentityManager identityManager)
     
  • Method Summary

    Modifier and Type
    Method
    Description
    io.undertow.security.api.AuthenticationMechanism.AuthenticationMechanismOutcome
    authenticate(io.undertow.server.HttpServerExchange exchange, io.undertow.security.api.SecurityContext securityContext)
     
    void
    init(Map<String,Object> args, PluginsRegistry pluginsRegistry)
     
    void
    sendAuthenticationInfoHeader(io.undertow.server.HttpServerExchange exchange)
     
    io.undertow.security.api.AuthenticationMechanism.ChallengeResult
    sendChallenge(io.undertow.server.HttpServerExchange exchange, io.undertow.security.api.SecurityContext securityContext)
     

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

    Methods inherited from interface org.restheart.plugins.security.AuthMechanism

    getMechanismName

    Methods inherited from interface org.restheart.plugins.ConfigurablePlugin

    arg, argOrDefault
  • Field Details

  • Constructor Details

    • DigestAuthMechanism

      public DigestAuthMechanism() throws ConfigurationException
      Throws:
      ConfigurationException
    • DigestAuthMechanism

      public DigestAuthMechanism(String mechanismName, List<io.undertow.security.idm.DigestAlgorithm> supportedAlgorithms, List<io.undertow.security.impl.DigestQop> supportedQops, String realmName, String domain, io.undertow.security.api.NonceManager nonceManager)
    • DigestAuthMechanism

      public DigestAuthMechanism(List<io.undertow.security.idm.DigestAlgorithm> supportedAlgorithms, List<io.undertow.security.impl.DigestQop> supportedQops, String realmName, String domain, io.undertow.security.api.NonceManager nonceManager, String mechanismName)
    • DigestAuthMechanism

      public DigestAuthMechanism(List<io.undertow.security.idm.DigestAlgorithm> supportedAlgorithms, List<io.undertow.security.impl.DigestQop> supportedQops, String realmName, String domain, io.undertow.security.api.NonceManager nonceManager, String mechanismName, io.undertow.security.idm.IdentityManager identityManager)
    • DigestAuthMechanism

      public DigestAuthMechanism(String realmName, String domain, String mechanismName)
    • DigestAuthMechanism

      public DigestAuthMechanism(String realmName, String domain, String mechanismName, io.undertow.security.idm.IdentityManager identityManager)
  • Method Details

    • init

      public void init(Map<String,Object> args, PluginsRegistry pluginsRegistry) throws ConfigurationException
      Throws:
      ConfigurationException
    • sendChallenge

      public io.undertow.security.api.AuthenticationMechanism.ChallengeResult sendChallenge(io.undertow.server.HttpServerExchange exchange, io.undertow.security.api.SecurityContext securityContext)
      Specified by:
      sendChallenge in interface io.undertow.security.api.AuthenticationMechanism
      Specified by:
      sendChallenge in interface AuthMechanism
    • authenticate

      public io.undertow.security.api.AuthenticationMechanism.AuthenticationMechanismOutcome authenticate(io.undertow.server.HttpServerExchange exchange, io.undertow.security.api.SecurityContext securityContext)
      Specified by:
      authenticate in interface io.undertow.security.api.AuthenticationMechanism
      Specified by:
      authenticate in interface AuthMechanism
    • sendAuthenticationInfoHeader

      public void sendAuthenticationInfoHeader(io.undertow.server.HttpServerExchange exchange)