Class SilverpeasLoginContext
- java.lang.Object
-
- org.silverpeas.core.jcr.impl.oak.security.SilverpeasLoginContext
-
- All Implemented Interfaces:
org.apache.jackrabbit.oak.spi.security.authentication.LoginContext
public class SilverpeasLoginContext extends Object implements org.apache.jackrabbit.oak.spi.security.authentication.LoginContext
Context of a login/logout to the JCR repository by a user within the scope of Silverpeas out of any JAAS process as the security system of Silverpeas isn't built upon this framework. Nevertheless, the JAAS logic in login/logout is respected (but not how it is performed). Such a context is created each time a login to the JCR is invoked, and it is reused for the logout after what it is disposed.At login or logout, it checks the type of credentials that is passed in order to invoke the
LoginModule
instances that support such a credentials. It chains then their invocation to perform the actual operation of login/logout until aLoginModule
instance responds successfully. When an authentication succeeds, the context expects through theLoginModule.commit()
method the subject to be enriched with thePrincipal
that identifies the authenticated user. Otherwise aLoginException
is thrown.The
LoginModule
instances to consider for a given credentials type are provided by theLoginModuleRegistry
object. So, anyLoginModule
defined for JCR authentication have to register themselves to this registry by indicating the type of credentials they support.- Author:
- mmoquillon
-
-
Method Detail
-
getSubject
public Subject getSubject()
- Specified by:
getSubject
in interfaceorg.apache.jackrabbit.oak.spi.security.authentication.LoginContext
-
login
public void login() throws LoginException
- Specified by:
login
in interfaceorg.apache.jackrabbit.oak.spi.security.authentication.LoginContext
- Throws:
LoginException
-
logout
public void logout() throws LoginException
- Specified by:
logout
in interfaceorg.apache.jackrabbit.oak.spi.security.authentication.LoginContext
- Throws:
LoginException
-
-