Class 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 a LoginModule instance responds successfully. When an authentication succeeds, the context expects through the LoginModule.commit() method the subject to be enriched with the Principal that identifies the authenticated user. Otherwise a LoginException is thrown.

    The LoginModule instances to consider for a given credentials type are provided by the LoginModuleRegistry object. So, any LoginModule 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 interface org.apache.jackrabbit.oak.spi.security.authentication.LoginContext
      • login

        public void login()
                   throws LoginException
        Specified by:
        login in interface org.apache.jackrabbit.oak.spi.security.authentication.LoginContext
        Throws:
        LoginException
      • logout

        public void logout()
                    throws LoginException
        Specified by:
        logout in interface org.apache.jackrabbit.oak.spi.security.authentication.LoginContext
        Throws:
        LoginException