Class DefaultSingleSignOn

java.lang.Object
org.wildfly.security.http.util.sso.DefaultSingleSignOn
All Implemented Interfaces:
AutoCloseable, ImmutableSingleSignOn, SingleSignOn

public class DefaultSingleSignOn extends Object implements SingleSignOn
SingleSignOn implementation backed by a DefaultSingleSignOnEntry.
Author:
Pedro Igor, Paul Ferraro
  • Constructor Details

  • Method Details

    • getId

      public String getId()
      Description copied from interface: ImmutableSingleSignOn
      Returns the unique identifier of this single sign-on entry.
      Specified by:
      getId in interface ImmutableSingleSignOn
      Returns:
      a unique identifier
    • getMechanism

      public String getMechanism()
      Description copied from interface: ImmutableSingleSignOn
      Returns the authentication mechanism associated with this single sign-on entry.
      Specified by:
      getMechanism in interface ImmutableSingleSignOn
      Returns:
      an authentication mechanism name
    • isProgrammatic

      public boolean isProgrammatic()
      Description copied from interface: ImmutableSingleSignOn
      Returns true if this single sign on is as a result of programmatic authentication.
      Specified by:
      isProgrammatic in interface ImmutableSingleSignOn
      Returns:
      true if this single sign on is as a result of programmatic authentication.
    • getName

      public String getName()
      Description copied from interface: ImmutableSingleSignOn
      Returns the name of the principal associated with this single sign-on entry.
      Specified by:
      getName in interface ImmutableSingleSignOn
      Returns:
      a principal name
    • getIdentity

      public SecurityIdentity getIdentity()
      Description copied from interface: ImmutableSingleSignOn
      Returns the transient security identity associated with this single sign-on entry.
      Specified by:
      getIdentity in interface ImmutableSingleSignOn
      Returns:
      a security identity, or null if this entry was created by another node.
    • setIdentity

      public void setIdentity(SecurityIdentity identity)
      Description copied from interface: SingleSignOn
      Associates a security identity with this single sign-on entry, only if no association exists.
      Specified by:
      setIdentity in interface SingleSignOn
      Parameters:
      identity - a security identity
    • addParticipant

      public boolean addParticipant(String applicationId, String sessionId, URI participant)
      Description copied from interface: SingleSignOn
      Adds a new participant to this single sign-on entry.
      Specified by:
      addParticipant in interface SingleSignOn
      Parameters:
      applicationId - the unique identifier of the application.
      sessionId - the unique identifier of the user session.
      participant - the authenticated request URI
      Returns:
      true, if this participant was added, false if this application is already associated with this single sign-on entry.
    • removeParticipant

      public Map.Entry<String,URI> removeParticipant(String applicationId)
      Description copied from interface: SingleSignOn
      Removes the participant for the specified application from this single sign-on entry.
      Specified by:
      removeParticipant in interface SingleSignOn
      Parameters:
      applicationId - a unique application identifier
      Returns:
      a tuple containing the unique session identifier and authenticated request URI, or null if the specified application was not associated with this single sign-on entry
    • getParticipants

      public Map<String,Map.Entry<String,URI>> getParticipants()
      Description copied from interface: ImmutableSingleSignOn
      Returns the participants associated with this single sign-on entry.
      Specified by:
      getParticipants in interface ImmutableSingleSignOn
      Returns:
      an unmodifiable mapping of application identifier to a tuple of the session identifier and request URI
    • invalidate

      public void invalidate()
      Description copied from interface: SingleSignOn
      Invalidates this single sign-on entry.
      Specified by:
      invalidate in interface SingleSignOn
    • close

      public void close()
      Description copied from interface: SingleSignOn
      Closes any resources associated with this single sign-on entry.
      Specified by:
      close in interface AutoCloseable
      Specified by:
      close in interface SingleSignOn