1 17 package org.apache.geronimo.jetty6; 18 19 import java.security.Principal ; 20 21 import org.mortbay.jetty.Request; 22 import org.mortbay.jetty.security.UserRealm; 23 24 25 28 public class JAASJettyRealm implements UserRealm { 29 30 private final String webRealmName; 31 private final InternalJAASJettyRealm internalJAASJettyRealm; 32 33 public JAASJettyRealm(String realmName, InternalJAASJettyRealm internalJAASJettyRealm) { 34 this.webRealmName = realmName; 35 this.internalJAASJettyRealm = internalJAASJettyRealm; 36 } 37 38 public String getName() { 39 return webRealmName; 40 } 41 42 public Principal getPrincipal(String username) { 43 return internalJAASJettyRealm.getPrincipal(username); 44 } 45 46 public Principal authenticate(String username, Object credentials, Request request) { 47 return internalJAASJettyRealm.authenticate(username, credentials, request); 48 } 49 50 public boolean reauthenticate(Principal user) { 51 return internalJAASJettyRealm.reauthenticate(user); 52 } 53 54 public boolean isUserInRole(Principal user, String role) { 55 return internalJAASJettyRealm.isUserInRole(user, role); 56 } 57 58 public void disassociate(Principal user) { 59 internalJAASJettyRealm.disassociate(user); 60 } 61 62 public Principal pushRole(Principal user, String role) { 63 return internalJAASJettyRealm.pushRole(user, role); 64 } 65 66 public Principal popRole(Principal user) { 67 return internalJAASJettyRealm.popRole(user); 68 } 69 70 public void logout(Principal user) { 71 internalJAASJettyRealm.logout(user); 72 } 73 74 public String getSecurityRealmName() { 75 return internalJAASJettyRealm.getSecurityRealmName(); 76 } 77 78 } 79 | Popular Tags |