1 package info.magnolia.jaas.sp; 2 3 import java.util.Map ; 4 5 import javax.security.auth.Subject ; 6 import javax.security.auth.callback.CallbackHandler ; 7 import javax.security.auth.login.LoginException ; 8 import javax.security.auth.spi.LoginModule ; 9 10 11 15 public abstract class AbstractLoginModule implements LoginModule { 16 17 public Subject subject; 18 19 public CallbackHandler callbackHandler; 20 21 public Map sharedState; 22 23 public Map options; 24 25 public void initialize(Subject subject, CallbackHandler callbackHandler, Map sharedState, Map options) { 26 this.subject = subject; 27 this.callbackHandler = callbackHandler; 28 this.sharedState = sharedState; 29 this.options = options; 30 } 31 32 35 public abstract boolean login() throws LoginException ; 36 37 40 public abstract boolean commit() throws LoginException ; 41 42 public boolean abort() throws LoginException { 43 return this.release(); 44 } 45 46 public boolean logout() throws LoginException { 47 return this.release(); 48 } 49 50 53 public abstract boolean release(); 54 55 59 public abstract boolean isValidUser(); 60 61 64 public abstract void setEntity(); 65 66 69 public abstract void setACL(); 70 71 } 72 | Popular Tags |