There are four varieties of context:
Local Anonymous
Local Authenticated
Remote Anonymous
Remote Authenticated
A local context calls the Identity Manager classes directly, while remote access can be achieved using SPML. Note that the Service Provider SPML handler does not perform authentication. The authentication should be executed by the portal application.
An anonymous context does not require a user name and password. If auditing is performed, it will use a system defined name. There is an anonymous local context, the internal context, that is used in the implementation of the Service Provider server. The internal context may also be accessed by application code, though note that you will lose the ability to record specific end-user names in the audit log.
All varieties of context are obtained from factory methods on the SessionFactory class. The factory methods are:
Connection Type |
Method |
Description |
---|---|---|
Local anonymous |
getServerInternalContext() |
Returns a fully authorized context without any authentication. |
Local authenticated |
getSPESession(String user, EncryptedData password) |
Constructs a session for the Service Provider user interface. |
Local authenticated |
getSPESession(Map credentials) |
Constructs a session for the Service Provider user interface. The map specifies the credentials of the user, including the values of the user and password keys. |
Local pre-authenticated |
getSPEPreAuthenticatedSession(String user) |
Constructs a pre-authenticated session for the Service Provider user interface. |
Remote anonymous |
Not applicable |
This connection type is only available through SPML. |
Remote authenticated |
getSession(URL url, String user, EncryptedData pass) |
Returns an authenticated session. |