Class IdentityAuthMechanism

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

public class IdentityAuthMechanism extends Object implements AuthMechanism
a simple Auth Mechanism to demonstrate how to plug a custom AuthenticationMechanism it authenticates all requests against the configured IdentityManager using the credentials specified in the configuration file
Author:
Andrea Di Cesare <andrea@softinstigate.com>
  • 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
  • Constructor Summary

    Constructors
    Constructor
    Description
     
  • 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> confArgs)
     
    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
  • Constructor Details

    • IdentityAuthMechanism

      public IdentityAuthMechanism()
  • Method Details

    • init

      public void init(Map<String,Object> confArgs) throws ConfigurationException
      Throws:
      ConfigurationException
    • 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
    • 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