public class ConfigurableSpnegoLoginService extends ContainerLifeCycle implements LoginService
A configurable (as opposed to using system properties) SPNEGO LoginService.
At startup, this LoginService will login via JAAS the service principal, composed
of the service name and the host name,
for example HTTP/wonder.com, using a keyTab file as the service principal
credentials.
Upon receiving an HTTP request, the server tries to authenticate the client
calling login(String, Object, ServletRequest) where the GSS APIs are used to
verify client tokens and (perhaps after a few round-trips) a GSSContext is
established.
AbstractLifeCycle.AbstractLifeCycleListenerContainer.InheritedListener, Container.ListenerLifeCycle.Listener| Constructor and Description |
|---|
ConfigurableSpnegoLoginService(String realm,
org.eclipse.jetty.security.authentication.AuthorizationService authorizationService) |
| Modifier and Type | Method and Description |
|---|---|
String |
getHostName() |
IdentityService |
getIdentityService()
Get the IdentityService associated with this Login Service.
|
Path |
getKeyTabPath() |
String |
getName() |
String |
getServiceName() |
UserIdentity |
login(String username,
Object credentials,
ServletRequest req)
Login a user.
|
void |
logout(UserIdentity user) |
void |
setHostName(String hostName) |
void |
setIdentityService(IdentityService identityService)
Set the IdentityService associated with this Login Service.
|
void |
setKeyTabPath(Path keyTabFile) |
void |
setServiceName(String serviceName) |
boolean |
validate(UserIdentity user)
Validate a user identity.
|
addBean, addBean, addEventListener, addManaged, contains, destroy, dump, dump, dump, dump, dump, dumpObject, dumpStdErr, getBean, getBeans, getBeans, getContainedBeans, isAuto, isManaged, isUnmanaged, manage, removeBean, removeBeans, removeEventListener, setBeans, setStopTimeout, unmanage, updateBean, updateBean, updateBeansaddLifeCycleListener, getState, getState, getStopTimeout, isFailed, isRunning, isStarted, isStarting, isStopped, isStopping, removeLifeCycleListener, start, stop, toStringequals, getClass, hashCode, notify, notifyAll, wait, wait, waitdumpContainer, dumpIterable, dumpMapEntries, dumpObjects, dumpSelf, namedpublic ConfigurableSpnegoLoginService(String realm, org.eclipse.jetty.security.authentication.AuthorizationService authorizationService)
public String getName()
getName in interface LoginServicepublic Path getKeyTabPath()
public void setKeyTabPath(Path keyTabFile)
keyTabFile - the path of the keyTab file containing service credentialspublic String getServiceName()
getHostName()public void setServiceName(String serviceName)
serviceName - the service namesetHostName(String)public String getHostName()
setServiceName(String)public void setHostName(String hostName)
hostName - the host name of the servicepublic UserIdentity login(String username, Object credentials, ServletRequest req)
LoginServicelogin in interface LoginServiceusername - The user namecredentials - The users credentialsreq - TODOpublic boolean validate(UserIdentity user)
LoginServiceLoginService.login(String, Object, ServletRequest) is still valid.validate in interface LoginServiceuser - The user to validatepublic IdentityService getIdentityService()
LoginServicegetIdentityService in interface LoginServicepublic void setIdentityService(IdentityService identityService)
LoginServicesetIdentityService in interface LoginServiceidentityService - the IdentityService associated with this Login Service.public void logout(UserIdentity user)
logout in interface LoginServiceCopyright © 2010 - 2020 Adobe. All Rights Reserved