diff options
Diffstat (limited to 'id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/storage/IAuthenticationSessionStoreage.java')
-rw-r--r-- | id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/storage/IAuthenticationSessionStoreage.java | 80 |
1 files changed, 26 insertions, 54 deletions
diff --git a/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/storage/IAuthenticationSessionStoreage.java b/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/storage/IAuthenticationSessionStoreage.java index 934b7ca65..c8d09e17e 100644 --- a/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/storage/IAuthenticationSessionStoreage.java +++ b/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/storage/IAuthenticationSessionStoreage.java @@ -30,6 +30,7 @@ import at.gv.egovernment.moa.id.auth.data.AuthenticationSessionExtensions; import at.gv.egovernment.moa.id.auth.exception.AuthenticationException; import at.gv.egovernment.moa.id.auth.exception.BuildException; import at.gv.egovernment.moa.id.commons.api.IRequest; +import at.gv.egovernment.moa.id.commons.api.data.IAuthenticationSession; import at.gv.egovernment.moa.id.commons.db.dao.session.AuthenticatedSessionStore; import at.gv.egovernment.moa.id.commons.db.dao.session.InterfederationSessionStore; import at.gv.egovernment.moa.id.commons.db.dao.session.OASessionStore; @@ -48,103 +49,74 @@ public interface IAuthenticationSessionStoreage { /** * Check if the stored MOASession is already authenticated * - * @param moaSessionID MOASession identifier + * @param internalSsoSessionID Internal MOA SSO-Session identifier * @return true if the MOASession is authenticated, otherwise false */ - public boolean isAuthenticated(String moaSessionID); + public boolean isAuthenticated(String internalSsoSessionID); /** - * Create a new MOASession + * Create a new MOA SSO-Session object in database + * The SSO session object get populated with eID information from pending request * * @param target Pending Request which is associated with this MOASession * @return MOASession object * @throws MOADatabaseException MOASession storage operation FAILED * @throws BuildException MOASession encryption FAILED */ - public AuthenticationSession createSession(IRequest target) throws MOADatabaseException, BuildException; + public AuthenticationSession createInternalSSOSession(IRequest target) throws MOADatabaseException, BuildException; /** * Get a MOASession with sessionID * - * @param sessionID SessionID which corresponds to a MOASession + * @param internalSsoSessionID Internal MOA SSO-Session identifier * @return MOASession, or null if no session exists with this ID * @throws MOADatabaseException MOASession load operation FAILED */ - public AuthenticationSession getSession(String sessionID) throws MOADatabaseException; + public AuthenticationSession getInternalSSOSession(String internalSsoSessionID) throws MOADatabaseException; /** * Get the session-data extension-object for a MOASession * - * @param sessionID SessionID which corresponds to a MOASession + * @param internalSsoSessionID Internal MOA SSO-Session identifier * @return AuthenticationSessionExtensions, or null if no session exists with this ID or extensionobject is null * @throws MOADatabaseException MOASession load operation FAILED */ - public AuthenticationSessionExtensions getAuthenticationSessionExtensions(String sessionID) throws MOADatabaseException; + public AuthenticationSessionExtensions getAuthenticationSessionExtensions(String internalSsoSessionID) throws MOADatabaseException; /** * Store a session-data extension-object to MOASession * - * @param sessionID SessionID which corresponds to a MOASession + * @param internalSsoSessionID Internal MOA SSO-Session identifier * @param sessionExtensions AuthenticationSessionExtensions object * @throws MOADatabaseException MOASession storage operation FAILED */ - public void setAuthenticationSessionExtensions(String sessionID, AuthenticationSessionExtensions sessionExtensions) throws MOADatabaseException; + public void setAuthenticationSessionExtensions(String internalSsoSessionID, AuthenticationSessionExtensions sessionExtensions) throws MOADatabaseException; /** - * Store a MOASession - * - * @param session MOASession which should be stored - * @throws MOADatabaseException MOASession storage operation FAILED - * @throws BuildException MOASession encryption FAILED - */ - public void storeSession(AuthenticationSession session) throws MOADatabaseException, BuildException; - - /** * Delete a MOASession * - * @param moaSessionID SessionID which corresponds to a MOASession + * @param internalSsoSessionID Internal MOA SSO-Session identifier * @throws MOADatabaseException MOASession delete operation FAILED */ - public void destroySession(String moaSessionID) throws MOADatabaseException; - - - /** - * Change the sessionID of a MOASession - * - * @param session MOASession for which the sessionID should be changed - * @param newSessionID new MOASessionID which should be used - * @return new MOASessionID - * @throws MOADatabaseException MOASession storage operation FAILED - * @throws BuildException MOASession encryption/decryption FAILED - */ - public String changeSessionID(AuthenticationSession session, String newSessionID) throws BuildException, MOADatabaseException; - - /** - * Change the sessionID of a MOASession - * - * @param session MOASession for which the sessionID should be changed - * @return new MOASessionID - * @throws MOADatabaseException MOASession storage operation FAILED - * @throws BuildException MOASession encryption/decryption FAILED - */ - public String changeSessionID(AuthenticationSession session) throws BuildException, MOADatabaseException; - + public void destroyInternalSSOSession(String internalSsoSessionID) throws MOADatabaseException; + /** * Set the isAuthenticated flag to MOASession * - * @param moaSessionID SessionID which corresponds to a MOASession + * @param internalSsoSessionID Internal MOA SSO-Session identifier * @param isAuthenticated Is authenticated flag (true/false) */ - public void setAuthenticated(String moaSessionID, boolean isAuthenticated); + public void setAuthenticated(String internalSsoSessionID, boolean isAuthenticated); /** * Find the MOASessionId of an active Single Sign-On session * * @param SSOSessionID Single Sign-On sessionID - * @return MOASessionID of the associated MOASession + * @return internal MOA SSO-Session of the associated SSO-Session Id + * @throws MOADatabaseException */ - public String getMOASessionSSOID(String SSOSessionID); + public AuthenticationSession getInternalMOASessionWithSSOID(String SSOSessionID) throws MOADatabaseException; /** * Check if a MOASession is an active Single Sign-On session @@ -182,7 +154,7 @@ public interface IAuthenticationSessionStoreage { * @param moaSession MOASession data object * @return List of Service-Provider information */ - public List<OASessionStore> getAllActiveOAFromMOASession(AuthenticationSession moaSession); + public List<OASessionStore> getAllActiveOAFromMOASession(IAuthenticationSession moaSession); /** @@ -191,7 +163,7 @@ public interface IAuthenticationSessionStoreage { * @param moaSession MOASession data object * @return List of Interfederation-IDP information */ - public List<InterfederationSessionStore> getAllActiveIDPsFromMOASession(AuthenticationSession moaSession); + public List<InterfederationSessionStore> getAllActiveIDPsFromMOASession(IAuthenticationSession moaSession); /** * Search a MOASession by using already transfered authentication information @@ -200,7 +172,7 @@ public interface IAuthenticationSessionStoreage { * @param userNameID UserId (bPK), which was send to this Service-Provider * @return MOASession, or null if no corresponding MOASession is found */ - public AuthenticationSession searchMOASessionWithNameIDandOAID(String oaID, String userNameID); + public IAuthenticationSession searchMOASessionWithNameIDandOAID(String oaID, String userNameID); /** * Search a active Single Sign-On session for a specific Service-Provider @@ -210,7 +182,7 @@ public interface IAuthenticationSessionStoreage { * @param protocolType Authentication protocol, which was used for SSO from this Service-Provider * @return Internal Single Sign-On information for this Service-Provider */ - public OASessionStore searchActiveOASSOSession(AuthenticationSession moaSession, String oaID, String protocolType); + public OASessionStore searchActiveOASSOSession(IAuthenticationSession moaSession, String oaID, String protocolType); /** @@ -219,7 +191,7 @@ public interface IAuthenticationSessionStoreage { * @param nameID UserID (bPK) * @return MOASession, or null if no corresponding MOASession is found */ - public AuthenticationSession getSessionWithUserNameID(String nameID); + public IAuthenticationSession getSessionWithUserNameID(String nameID); /** * Search an active federation IDP which could be used for federated Single Sign-On @@ -283,7 +255,7 @@ public interface IAuthenticationSessionStoreage { * @param oaurl * @param requestedModule */ - public void markOAWithAttributeQueryUsedFlag(AuthenticationSession session, String oaurl, String requestedModule); + public void markOAWithAttributeQueryUsedFlag(IAuthenticationSession session, String oaurl, String requestedModule); /** * @param nextIDPInformation |