public final class SessionManagerImpl extends Object implements SessionManager
SessionManager
Modifier and Type | Field and Description |
---|---|
static String |
PROP_FETCH_ETK
Configuration to (des)activate the fetch of an Encryption Token linked to the session.
|
Modifier and Type | Method and Description |
---|---|
SessionItem |
createFallbackSession(String hokPwd)
Creates a fallback session using a eHealth certificate stored on the computer.
|
SessionItem |
createFallbackSession(String hokPwd,
String encryptionPwd)
Creates a fallback session using a eHealth certificate stored on the computer.
|
SessionItem |
createFallbackSession(String idnetPwd,
String hokPwd,
String encryptionPwd)
Creates a fallback session using a eHealth certificate stored on the computer.
|
SessionItem |
createSession(String hokPwd)
Creates a session using the certificate on the eID of the user and an holder of key certificate stored on the computer.
|
SessionItem |
createSession(String hokPwd,
String encryptionPwd)
Creates a session using the certificate on the eID of the user and an holder of key certificate stored on the computer.
|
SessionItem |
createSessionEidOnly()
Creates a session only based on eid card.
|
static SessionManagerImpl |
getInstance() |
SessionItem |
getSession()
Gets the current session.
|
boolean |
hasValidSession()
Checks for valid session.
|
void |
loadEncryptionKeys(String encryptionPwd) |
void |
loadSession(SAMLToken token,
String hokPwd)
Load a session using a previously stored SAML token.
|
void |
loadSession(SAMLToken token,
String hokPwd,
String encryptionPwd)
Load a session using a previously stored SAML token with the associated eHealth Encryption Certificates, needed for sealing and
unsealing messages.
|
void |
registerSessionService(SessionServiceWithCache serviceWithCache)
This method will register all the session service with a cache.
|
void |
setKeyStore(Map<String,KeyStore> keystores)
Method to set the keyStores that the sessionManagment should use.
|
void |
unloadSession()
Unload the current session.
|
public static final String PROP_FETCH_ETK
public static SessionManagerImpl getInstance()
public void loadSession(SAMLToken token, String hokPwd) throws TechnicalConnectorException
SessionManager
loadSession
in interface SessionManager
token
- the token to loadhokPwd
- the holder of key passwordTechnicalConnectorException
- the technical connector exceptionpublic void loadSession(SAMLToken token, String hokPwd, String encryptionPwd) throws TechnicalConnectorException
SessionManager
loadSession
in interface SessionManager
token
- the token to loadhokPwd
- the holder of key passwordencryptionPwd
- the encryption of key passwordTechnicalConnectorException
public SessionItem createSessionEidOnly() throws TechnicalConnectorException
SessionManager
createSessionEidOnly
in interface SessionManager
SessionItem
not usable for encryptionTechnicalConnectorException
public SessionItem createSession(String hokPwd) throws TechnicalConnectorException
SessionManager
createSession
in interface SessionManager
hokPwd
- the holder of key passwordTechnicalConnectorException
- the technical connector exceptionpublic SessionItem createSession(String hokPwd, String encryptionPwd) throws TechnicalConnectorException
SessionManager
createSession
in interface SessionManager
hokPwd
- the holder of key passwordencryptionPwd
- the encryption of key passwordTechnicalConnectorException
- the technical connector exceptionpublic SessionItem createFallbackSession(String hokPwd) throws TechnicalConnectorException
SessionManager
createFallbackSession
in interface SessionManager
hokPwd
- the holder of key passwordTechnicalConnectorException
- the technical connector exceptionpublic SessionItem createFallbackSession(String hokPwd, String encryptionPwd) throws TechnicalConnectorException
SessionManager
createFallbackSession
in interface SessionManager
hokPwd
- the holder of key passwordencryptionPwd
- the encryption of key passwordTechnicalConnectorException
- the technical connector exceptionpublic SessionItem createFallbackSession(String idnetPwd, String hokPwd, String encryptionPwd) throws TechnicalConnectorException
SessionManager
createFallbackSession
in interface SessionManager
idnetPwd
- the identification pwdhokPwd
- the holder of key passwordencryptionPwd
- the encryption of key passwordTechnicalConnectorException
- the technical connector exceptionpublic SessionItem getSession()
SessionManager
getSession
in interface SessionManager
public void unloadSession()
SessionManager
unloadSession
in interface SessionManager
public boolean hasValidSession() throws SessionManagementException
SessionManager
hasValidSession
in interface SessionManager
SessionManagementException
public void loadEncryptionKeys(String encryptionPwd) throws TechnicalConnectorException
loadEncryptionKeys
in interface SessionManager
encryptionPwd
- the encryption of key passwordTechnicalConnectorException
public void registerSessionService(SessionServiceWithCache serviceWithCache)
SessionManager
registerSessionService
in interface SessionManager
be.ehealth.technicalconnector.session.SessionManager#registreCacheCleaner(be.ehealth.businessconnector.CleanUpCache)
public void setKeyStore(Map<String,KeyStore> keystores)
SessionManager
setKeyStore
in interface SessionManager
Connector Packaging TECHNICAL 4.0.2 API
Copyright © {inceptionYear}-2021 eHealth. All Rights Reserved.