1 16 17 package org.apache.jetspeed.services; 18 19 import org.apache.turbine.services.TurbineServices; 21 22 import org.apache.jetspeed.om.security.JetspeedUser; 24 import org.apache.jetspeed.services.security.PortalAuthentication; 25 import org.apache.jetspeed.services.security.LoginException; 26 27 28 34 public abstract class JetspeedAuthentication 35 { 36 49 public static JetspeedUser login(String username, String password) 50 throws LoginException 51 { 52 return getService().login(username, password); 53 } 54 55 61 public static JetspeedUser getAnonymousUser() 62 throws LoginException 63 { 64 return getService().getAnonymousUser(); 65 } 66 67 76 public static void logout() 77 throws LoginException 78 { 79 getService().logout(); 80 } 81 82 88 protected static PortalAuthentication getService() 89 { 90 return (PortalAuthentication)TurbineServices 91 .getInstance().getService(PortalAuthentication.SERVICE_NAME); 92 } 93 94 95 } 96 97 98 | Popular Tags |