X-Git-Url: https://git.argeo.org/?a=blobdiff_plain;f=org.argeo.cms%2Fsrc%2Forg%2Fargeo%2Fcms%2Fauth%2FKeyringLoginModule.java;h=ebab12f2cc4cd24149787663aa52dad44c651961;hb=54df376a9c2dd458a82eaa09bfbb718fe699dd0d;hp=4a4151edc47146b37d36b87fe01a3a85ea352e5b;hpb=5b3108fe285bca50565b58b63fa4feddc96c0765;p=lgpl%2Fargeo-commons.git diff --git a/org.argeo.cms/src/org/argeo/cms/auth/KeyringLoginModule.java b/org.argeo.cms/src/org/argeo/cms/auth/KeyringLoginModule.java index 4a4151edc..ebab12f2c 100644 --- a/org.argeo.cms/src/org/argeo/cms/auth/KeyringLoginModule.java +++ b/org.argeo.cms/src/org/argeo/cms/auth/KeyringLoginModule.java @@ -1,21 +1,5 @@ -/* - * Copyright (C) 2007-2012 Argeo GmbH - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ package org.argeo.cms.auth; -import java.security.AccessController; import java.util.Map; import java.util.Set; @@ -30,8 +14,9 @@ import javax.security.auth.callback.PasswordCallback; import javax.security.auth.login.LoginException; import javax.security.auth.spi.LoginModule; -import org.argeo.api.security.PBEKeySpecCallback; -import org.argeo.util.PasswordEncryption; +import org.argeo.api.cms.keyring.PBEKeySpecCallback; +import org.argeo.cms.util.CurrentSubject; +import org.argeo.cms.util.PasswordEncryption; /** Adds a secret key to the private credentials */ public class KeyringLoginModule implements LoginModule { @@ -43,7 +28,7 @@ public class KeyringLoginModule implements LoginModule { Map options) { this.subject = subject; if (subject == null) { - subject = Subject.getSubject(AccessController.getContext()); + this.subject = CurrentSubject.current(); } this.callbackHandler = callbackHandler; }