use of org.wso2.carbon.identity.oidc.session.cache.OIDCSessionParticipantCacheKey in project identity-inbound-auth-oauth by wso2-extensions.
the class OIDCSessionManager method removeOIDCSessionState.
/**
* Removes the session against the given session id.
*
* @param sessionId session id value
* @param loginTenantDomain login tenant domain
*/
public void removeOIDCSessionState(String sessionId, String loginTenantDomain) {
String tenantDomain = resolveCacheTenantDomain(loginTenantDomain);
OIDCSessionParticipantCacheKey cacheKey = new OIDCSessionParticipantCacheKey();
cacheKey.setSessionID(sessionId);
OIDCSessionParticipantCache.getInstance().clearCacheEntry(cacheKey, tenantDomain);
}
use of org.wso2.carbon.identity.oidc.session.cache.OIDCSessionParticipantCacheKey in project identity-inbound-auth-oauth by wso2-extensions.
the class OIDCSessionManager method storeOIDCSessionState.
/**
* Stores the session state against the provided session id.
*
* @param sessionId session id value
* @param sessionState OIDCSessionState instance
* @param loginTenantDomain login tenant domain
*/
public void storeOIDCSessionState(String sessionId, OIDCSessionState sessionState, String loginTenantDomain) {
String tenantDomain = resolveCacheTenantDomain(loginTenantDomain);
OIDCSessionParticipantCacheKey cacheKey = new OIDCSessionParticipantCacheKey();
cacheKey.setSessionID(sessionId);
OIDCSessionParticipantCacheEntry cacheEntry = new OIDCSessionParticipantCacheEntry();
cacheEntry.setSessionState(sessionState);
cacheEntry.setTenantDomain(tenantDomain);
OIDCSessionParticipantCache.getInstance().addToCache(cacheKey, cacheEntry, tenantDomain);
}
use of org.wso2.carbon.identity.oidc.session.cache.OIDCSessionParticipantCacheKey in project identity-inbound-auth-oauth by wso2-extensions.
the class OIDCSessionManager method getOIDCSessionState.
/**
* Retrieves session state for the given session id.
*
* @param sessionId session id value
* @param loginTenantDomain login tenant domain
* @return OIDCSessionState instance
*/
public OIDCSessionState getOIDCSessionState(String sessionId, String loginTenantDomain) {
String tenantDomain = resolveCacheTenantDomain(loginTenantDomain);
OIDCSessionParticipantCacheKey cacheKey = new OIDCSessionParticipantCacheKey();
cacheKey.setSessionID(sessionId);
OIDCSessionParticipantCacheEntry cacheEntry = OIDCSessionParticipantCache.getInstance().getValueFromCache(cacheKey, tenantDomain);
return cacheEntry == null ? null : cacheEntry.getSessionState();
}
Aggregations