X-Git-Url: https://git.argeo.org/?a=blobdiff_plain;f=org.argeo.cms%2Fsrc%2Forg%2Fargeo%2Fcms%2Fauth%2FKeyringLoginModule.java;h=af559df7558026fc187dbf055181b86dd0deaa68;hb=3c1cdc594d954520b14646102b366290bdad58c7;hp=09fece03aa560fb9e6e350b2ae811b3e47b40e1e;hpb=6d206b9052689ffa880cd4593bfefa704dc0dd46;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 09fece03a..af559df75 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,7 +14,8 @@ import javax.security.auth.callback.PasswordCallback; import javax.security.auth.login.LoginException; import javax.security.auth.spi.LoginModule; -import org.argeo.node.security.PBEKeySpecCallback; +import org.argeo.cms.security.PBEKeySpecCallback; +import org.argeo.util.CurrentSubject; import org.argeo.util.PasswordEncryption; /** Adds a secret key to the private credentials */ @@ -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; }