Class SecurityContextImpl

java.lang.Object
io.undertow.security.impl.AbstractSecurityContext
org.wildfly.elytron.web.undertow.server.SecurityContextImpl
All Implemented Interfaces:
io.undertow.security.api.SecurityContext

public class SecurityContextImpl extends io.undertow.security.impl.AbstractSecurityContext
The Elytron specific SecurityContext implementation.
Author:
Darran Lofthouse
  • Field Details

    • securityDomain

      protected final org.wildfly.security.auth.server.SecurityDomain securityDomain
  • Constructor Details

  • Method Details

    • authenticate

      public boolean authenticate()
      See Also:
      • SecurityContext.authenticate()
    • setLogoutHandler

      protected void setLogoutHandler(Runnable runnable)
    • login

      public boolean login(String username, String password)
      See Also:
      • SecurityContext.login(java.lang.String, java.lang.String)
    • logout

      public void logout()
      Specified by:
      logout in interface io.undertow.security.api.SecurityContext
      Overrides:
      logout in class io.undertow.security.impl.AbstractSecurityContext
    • setAuthenticationRequired

      public void setAuthenticationRequired()
      Specified by:
      setAuthenticationRequired in interface io.undertow.security.api.SecurityContext
      Overrides:
      setAuthenticationRequired in class io.undertow.security.impl.AbstractSecurityContext
    • isAuthenticationRequired

      public boolean isAuthenticationRequired()
      Specified by:
      isAuthenticationRequired in interface io.undertow.security.api.SecurityContext
      Overrides:
      isAuthenticationRequired in class io.undertow.security.impl.AbstractSecurityContext
    • setAuthenticationRequired

      public void setAuthenticationRequired(boolean required)
      Set the authentication requirement directly. Used by Jakarta Authorization Policy to override constraint-based decisions. This allows Policy to have final authority over whether authentication is required.
      Parameters:
      required - true if authentication is required, false if resource is unchecked
    • authenticationComplete

      protected void authenticationComplete(org.wildfly.security.auth.server.SecurityIdentity securityIdentity, String mechanism)
    • addAuthenticationMechanism

      public void addAuthenticationMechanism(io.undertow.security.api.AuthenticationMechanism mechanism)
      See Also:
      • SecurityContext.addAuthenticationMechanism(io.undertow.security.api.AuthenticationMechanism)
    • getAuthenticationMechanisms

      public List<io.undertow.security.api.AuthenticationMechanism> getAuthenticationMechanisms()
      See Also:
      • SecurityContext.getAuthenticationMechanisms()
    • getIdentityManager

      public io.undertow.security.idm.IdentityManager getIdentityManager()
      See Also:
      • SecurityContext.getIdentityManager()