Class LoginSession

java.lang.Object
pl.edu.icm.unity.engine.api.authn.LoginSession

public class LoginSession extends Object
Represents login session. Session expiration can be stored in two ways: either to expire after a certain time of inactivity is reached or when an absolute point in time is reached. The first case is the typical one. The latter is used when user's session should be preserved between browser shutdowns.

In the absolute termination time the maxInactivity time is also used, but only after the absolute expiration time has passed. This prevents killing such session when it is being used.

Author:
K. Benedyczak
  • Constructor Details

  • Method Details

    • getId

      public String getId()
    • setId

      public void setId(String id)
    • getStarted

      public Date getStarted()
    • setStarted

      public void setStarted(Date started)
    • getExpires

      public Date getExpires()
    • setExpires

      public void setExpires(Date expires)
    • getEntityId

      public long getEntityId()
    • setEntityId

      public void setEntityId(long entityId)
    • getRealm

      public String getRealm()
    • setRealm

      public void setRealm(String realm)
    • getSessionData

      public Map<String,String> getSessionData()
    • setSessionData

      public void setSessionData(Map<String,String> sessionData)
    • getLastUsed

      public Date getLastUsed()
    • setLastUsed

      public void setLastUsed(Date lastUsed)
    • getMaxInactivity

      public long getMaxInactivity()
    • setMaxInactivity

      public void setMaxInactivity(long maxInactivity)
    • getEntityLabel

      public String getEntityLabel()
    • setEntityLabel

      public void setEntityLabel(String entityLabel)
    • getAuthenticatedIdentities

      public Set<String> getAuthenticatedIdentities()
    • addAuthenticatedIdentities

      public void addAuthenticatedIdentities(Collection<String> identity)
    • getRemoteIdP

      public String getRemoteIdP()
    • setRemoteIdP

      public void setRemoteIdP(String remoteIdP)
    • getOutdatedCredentialId

      public String getOutdatedCredentialId()
    • isUsedOutdatedCredential

      public boolean isUsedOutdatedCredential()
    • setOutdatedCredentialId

      public void setOutdatedCredentialId(String outdatedCredentialId)
    • getRememberMeInfo

      public LoginSession.RememberMeInfo getRememberMeInfo()
    • setRememberMeInfo

      public void setRememberMeInfo(LoginSession.RememberMeInfo rememberMeInfo)
    • getLogin1stFactor

      public LoginSession.AuthNInfo getLogin1stFactor()
    • getLogin1stFactorOptionId

      public pl.edu.icm.unity.base.authn.AuthenticationOptionKey getLogin1stFactorOptionId()
    • setLogin1stFactor

      public void setLogin1stFactor(LoginSession.AuthNInfo login1stFactor)
    • getLogin2ndFactor

      public LoginSession.AuthNInfo getLogin2ndFactor()
    • getLogin2ndFactorOptionId

      public pl.edu.icm.unity.base.authn.AuthenticationOptionKey getLogin2ndFactorOptionId()
    • setLogin2ndFactor

      public void setLogin2ndFactor(LoginSession.AuthNInfo login2ndFactor)
    • getAdditionalAuthn

      public LoginSession.AuthNInfo getAdditionalAuthn()
    • setAdditionalAuthn

      public void setAdditionalAuthn(LoginSession.AuthNInfo additionalAuthn)
    • isExpiredAt

      public boolean isExpiredAt(long timestamp)
    • getFirstFactorRemoteIdPAuthnContext

      public RemoteAuthnMetadata getFirstFactorRemoteIdPAuthnContext()
    • setFirstFactorRemoteIdPAuthnContext

      public void setFirstFactorRemoteIdPAuthnContext(RemoteAuthnMetadata firstFactorRemoteIdPAuthnContext)
    • deserialize

      public void deserialize(pl.edu.icm.unity.base.token.Token token)
    • getTokenContents

      public byte[] getTokenContents()
    • toString

      public String toString()
      Overrides:
      toString in class Object