Class IdentityAuthMechanism

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

public class IdentityAuthMechanism extends Object implements org.restheart.plugins.security.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
     
    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
  • Constructor Details

    • IdentityAuthMechanism

      public IdentityAuthMechanism()
  • Method Details

    • init

      public void init() throws org.restheart.configuration.ConfigurationException
      Throws:
      org.restheart.configuration.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 org.restheart.plugins.security.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 org.restheart.plugins.security.AuthMechanism