Class AbstractEdAuthRealm
- java.lang.Object
-
- org.eclipse.jetty.util.component.AbstractLifeCycle
-
- edu.vt.middleware.ldap.ed.jetty.realm.AbstractEdAuthRealm
-
- All Implemented Interfaces:
org.eclipse.jetty.security.LoginService,org.eclipse.jetty.util.component.LifeCycle
- Direct Known Subclasses:
EdAuthRealm,LoginRealm
public abstract class AbstractEdAuthRealm extends org.eclipse.jetty.util.component.AbstractLifeCycle implements org.eclipse.jetty.security.LoginServiceBase class to provide drop in authentication against EdAuth using Jetty security realms.- Author:
- Middleware Services
-
-
Field Summary
Fields Modifier and Type Field Description protected EdAuthServiceauthDirectory classprotected org.eclipse.jetty.security.IdentityServiceidentityServiceDefault IdentityService for realm.protected org.slf4j.LoggerloggerClass logger instance.protected StringrealmNameDescriptive information about this Realm implementation.
-
Constructor Summary
Constructors Constructor Description AbstractEdAuthRealm(EdAuthService service, String name)Creates a new instance of an EDAuthRealm object that can provide authentication against EdAuth for the production environment.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description org.eclipse.jetty.security.IdentityServicegetIdentityService()Return the defaultIdentityServiceStringgetName()Returns the name of the realm.org.eclipse.jetty.server.UserIdentitylogin(String username, Object credentials, javax.servlet.ServletRequest servletRequest)The core function which authenticates the user and gathers the roles.voidlogout(org.eclipse.jetty.server.UserIdentity user)This method is not supported by this Realm.voidsetIdentityService(org.eclipse.jetty.security.IdentityService iService)This method is not supported in this realm.voidsetName(String name)Sets the name of the realm.booleanvalidate(org.eclipse.jetty.server.UserIdentity user)This method will return true is the user is not null, false otherwise.
-
-
-
Field Detail
-
logger
protected final org.slf4j.Logger logger
Class logger instance.
-
identityService
protected final org.eclipse.jetty.security.IdentityService identityService
Default IdentityService for realm.
-
realmName
protected String realmName
Descriptive information about this Realm implementation.
-
auth
protected EdAuthService auth
Directory class
-
-
Constructor Detail
-
AbstractEdAuthRealm
public AbstractEdAuthRealm(EdAuthService service, String name)
Creates a new instance of an EDAuthRealm object that can provide authentication against EdAuth for the production environment.- Parameters:
service-EdAuthServiceto perform authenticationname-Stringrealm name
-
-
Method Detail
-
getName
public String getName()
Returns the name of the realm. (default: EdAuthRealm)- Specified by:
getNamein interfaceorg.eclipse.jetty.security.LoginService- Returns:
String
-
login
public org.eclipse.jetty.server.UserIdentity login(String username, Object credentials, javax.servlet.ServletRequest servletRequest)
The core function which authenticates the user and gathers the roles.
-
validate
public boolean validate(org.eclipse.jetty.server.UserIdentity user)
This method will return true is the user is not null, false otherwise.- Specified by:
validatein interfaceorg.eclipse.jetty.security.LoginService- Parameters:
user-UserIdentity- Returns:
boolean
-
logout
public void logout(org.eclipse.jetty.server.UserIdentity user)
This method is not supported by this Realm. It will do nothing.- Specified by:
logoutin interfaceorg.eclipse.jetty.security.LoginService- Parameters:
user-UserIdentity
-
getIdentityService
public org.eclipse.jetty.security.IdentityService getIdentityService()
Return the defaultIdentityService- Specified by:
getIdentityServicein interfaceorg.eclipse.jetty.security.LoginService- Returns:
IdentityService
-
setIdentityService
public void setIdentityService(org.eclipse.jetty.security.IdentityService iService)
This method is not supported in this realm.- Specified by:
setIdentityServicein interfaceorg.eclipse.jetty.security.LoginService- Parameters:
iService-IdentityService
-
-