From 5d6cff491ed7cb129dd336bcde82f1452a765447 Mon Sep 17 00:00:00 2001 From: eelhazati Date: Tue, 28 Jan 2020 21:38:07 +0100 Subject: [PATCH] security jaas: tabs --- .../jaas/authentication/InMemoryLoginModule.java | 4 +--- security-jaas/jaas.policy | 10 +++++----- 2 files changed, 6 insertions(+), 8 deletions(-) diff --git a/security-jaas/jaas-login-module/src/main/java/com/baeldung/security/jaas/authentication/InMemoryLoginModule.java b/security-jaas/jaas-login-module/src/main/java/com/baeldung/security/jaas/authentication/InMemoryLoginModule.java index 4a9051ce81..27b57072cd 100644 --- a/security-jaas/jaas-login-module/src/main/java/com/baeldung/security/jaas/authentication/InMemoryLoginModule.java +++ b/security-jaas/jaas-login-module/src/main/java/com/baeldung/security/jaas/authentication/InMemoryLoginModule.java @@ -25,9 +25,7 @@ public class InMemoryLoginModule implements LoginModule { private Principal userPrincipal; @Override - public void initialize(Subject subject, - CallbackHandler callbackHandler, - Map sharedState, + public void initialize(Subject subject, CallbackHandler callbackHandler, Map sharedState, Map options) { this.subject = subject; this.callbackHandler = callbackHandler; diff --git a/security-jaas/jaas.policy b/security-jaas/jaas.policy index 0f5b3cbe33..d3109d62e7 100644 --- a/security-jaas/jaas.policy +++ b/security-jaas/jaas.policy @@ -1,8 +1,8 @@ grant codebase "file:./jaas-app/target/jaas-app.jar" { - permission javax.security.auth.AuthPermission "createLoginContext.jaasApplication"; - permission javax.security.auth.AuthPermission "doAsPrivileged"; - permission java.lang.RuntimePermission "readFileDescriptor"; - permission java.lang.RuntimePermission "writeFileDescriptor"; + permission javax.security.auth.AuthPermission "createLoginContext.jaasApplication"; + permission javax.security.auth.AuthPermission "doAsPrivileged"; + permission java.lang.RuntimePermission "readFileDescriptor"; + permission java.lang.RuntimePermission "writeFileDescriptor"; }; grant codebase "file:./jaas-login-module/target/jaas-login-module.jar" { @@ -10,5 +10,5 @@ grant codebase "file:./jaas-login-module/target/jaas-login-module.jar" { }; grant principal com.sun.security.auth.UserPrincipal "testuser" { - permission com.baeldung.security.jaas.app.ResourcePermission "test_resource"; + permission com.baeldung.security.jaas.app.ResourcePermission "test_resource"; };