Remove deprecated warnings
[lgpl/argeo-commons.git] / org.argeo.api.cms / src / org / argeo / api / cms / CmsAuth.java
index decea35508a4da5db931fc3b44a4a7732d5b68d7..6ecfeba11c6689283b04507e9243c9ea6eaa7df8 100644 (file)
@@ -1,5 +1,6 @@
 package org.argeo.api.cms;
 
+import javax.security.auth.Subject;
 import javax.security.auth.callback.CallbackHandler;
 import javax.security.auth.login.LoginContext;
 import javax.security.auth.login.LoginException;
@@ -21,6 +22,14 @@ public enum CmsAuth {
                return new LoginContext(getLoginContextName(), callbackHandler);
        }
 
+       public LoginContext newLoginContext(Subject subject, CallbackHandler callbackHandler) throws LoginException {
+               return new LoginContext(getLoginContextName(), subject, callbackHandler);
+       }
+
+       public LoginContext newLoginContext(Subject subject) throws LoginException {
+               return new LoginContext(getLoginContextName(), subject);
+       }
+
        /*
         * LOGIN CONTEXTS
         */