Class OAuthAccessToken

java.lang.Object
overit.geocall.base.auth.OAuthAccessToken

public class OAuthAccessToken extends Object
  • Field Details

    • functions

      protected Set<String> functions
    • sessionCache

      protected static ExpiringMap<String,MicroSession> sessionCache
    • sessionId

      protected final String sessionId
    • issuedAt

      protected final long issuedAt
    • expiration

      protected final long expiration
    • username

      protected String username
    • attributes

      protected HashGetter attributes
  • Constructor Details

    • OAuthAccessToken

      protected OAuthAccessToken(String sessionId, long issuedAt, long expiration, String username)
  • Method Details

    • parse

      public static OAuthAccessToken parse(overit.geocall.base.sso.oauth2.OAuthValidator oauthValidator) throws MicroException
      Throws:
      MicroException
    • getSessionId

      public String getSessionId()
    • getIssuedAt

      public long getIssuedAt()
    • getExpiration

      public long getExpiration()
    • getDuration

      public long getDuration()
    • getUsername

      public String getUsername()
    • getCachedSession

      @Deprecated(since="12.2", forRemoval=true) public MicroSession getCachedSession() throws MicroException
      Deprecated, for removal: This API element is subject to removal in a future version.
      This method is deprecated and should not be used. Use MicroSession.fetch(String) instead.
      getCachedSession retrieves a MicroSession from the internal session cache using the session ID associated with the AccessToken.
      Returns:
      the MicroSession associated with the session ID, or null if no mapping is found
      Throws:
      MicroException - not used
    • addFunctions

      public void addFunctions(List<String> functions)
    • getFunctions

      public Set<String> getFunctions()
    • resetCachedSession

      @Deprecated(since="12.2", forRemoval=true) public void resetCachedSession(MicroSession ms)
      Deprecated, for removal: This API element is subject to removal in a future version.
      This method is deprecated and should not be used. Use MicroSessionCacheService.put(MicroSession, long) instead.
      resetCachedSession puts a MicroSession in the internal session cache using the session ID associated with the AccessToken.
      Parameters:
      ms - the MicroSession associated with the session ID
    • getAttributes

      public HashGetter getAttributes()