Class CurrentWindowsIdentityAuthenticator
- java.lang.Object
- 
- org.apache.catalina.util.LifecycleBase
- 
- org.apache.catalina.util.LifecycleMBeanBase
- 
- org.apache.catalina.valves.ValveBase
- 
- org.apache.catalina.authenticator.AuthenticatorBase
- 
- net.sf.michaelo.tomcat.authenticator.CurrentWindowsIdentityAuthenticator
 
 
 
 
 
- 
- All Implemented Interfaces:
- MBeanRegistration,- RegistrationListener,- Authenticator,- Contained,- JmxEnabled,- Lifecycle,- Valve
 
 public class CurrentWindowsIdentityAuthenticator extends AuthenticatorBase A Windows Identity Authenticator which uses GSS-API to retrieve to currently logged in user. This authenticator requires a realm which implements theGSSRealminterface.
- 
- 
Nested Class Summary- 
Nested classes/interfaces inherited from class org.apache.catalina.authenticator.AuthenticatorBaseAuthenticatorBase.AllowCorsPreflight
 - 
Nested classes/interfaces inherited from interface org.apache.catalina.LifecycleLifecycle.SingleUse
 
- 
 - 
Field SummaryFields Modifier and Type Field Description protected static StringCURRENT_WINDOWS_IDENTITY_AUTH_SCHEMEprotected static StringCURRENT_WINDOWS_IDENTITY_METHODprotected static OidKRB5_MECHANISMprotected Logloggerprotected StringManagersmprotected static OidSPNEGO_MECHANISM- 
Fields inherited from class org.apache.catalina.authenticator.AuthenticatorBasealwaysUseSession, AUTH_HEADER_NAME, cache, changeSessionIdOnAuthentication, context, disableProxyCaching, jaspicCallbackHandlerClass, REALM_NAME, securePagesWithPragma, secureRandomAlgorithm, secureRandomClass, secureRandomProvider, sendAuthInfoResponseHeaders, sessionIdGenerator, sso
 - 
Fields inherited from class org.apache.catalina.valves.ValveBaseasyncSupported, container, containerLog, next
 - 
Fields inherited from class org.apache.catalina.util.LifecycleMBeanBasemserver
 - 
Fields inherited from interface org.apache.catalina.LifecycleAFTER_DESTROY_EVENT, AFTER_INIT_EVENT, AFTER_START_EVENT, AFTER_STOP_EVENT, BEFORE_DESTROY_EVENT, BEFORE_INIT_EVENT, BEFORE_START_EVENT, BEFORE_STOP_EVENT, CONFIGURE_START_EVENT, CONFIGURE_STOP_EVENT, PERIODIC_EVENT, START_EVENT, STOP_EVENT
 
- 
 - 
Constructor SummaryConstructors Constructor Description CurrentWindowsIdentityAuthenticator()
 - 
Method SummaryAll Methods Instance Methods Concrete Methods Modifier and Type Method Description protected booleandoAuthenticate(Request request, HttpServletResponse response)protected StringgetAuthMethod()StringgetLoginEntryName()Returns the configured login entry name.booleanisErrorMessagesAsHeaders()Indicates whether error messages will be responded as headers.booleanisOmitErrorMessages()Indicates whether error messages are responded to the client.booleanisStoreDelegatedCredential()Indicates whether client's (initiator's) delegated credential is stored in the user principal.protected voidrespondErrorMessage(Request request, HttpServletResponse response, int statusCode, String messageKey, Object... params)protected voidsendInternalServerError(Request request, HttpServletResponse response, String messageKey, Object... params)protected voidsendUnauthorized(Request request, HttpServletResponse response, String scheme)protected voidsendUnauthorized(Request request, HttpServletResponse response, String scheme, String messageKey, Object... params)voidsetErrorMessagesAsHeaders(boolean errorMessagesAsHeaders)Sets whether error messages will be returned as headers.voidsetLoginEntryName(String loginEntryName)Sets the login entry name which establishes the security context.voidsetOmitErrorMessages(boolean omitErrorMessages)Sets whether error messages are responded to the client.voidsetStoreDelegatedCredential(boolean storeDelegatedCredential)Sets whether client's (initiator's) delegated credential is stored in the user principal.- 
Methods inherited from class org.apache.catalina.authenticator.AuthenticatorBaseallowCorsPreflightBypass, associate, authenticate, changeSessionID, checkForCachedAuthentication, doLogin, getAllowCorsPreflight, getAlwaysUseSession, getCache, getChangeSessionIdOnAuthentication, getContainer, getDisableProxyCaching, getJaspicCallbackHandlerClass, getRealmName, getSecurePagesWithPragma, getSecureRandomAlgorithm, getSecureRandomClass, getSecureRandomProvider, invoke, isContinuationRequired, isPreemptiveAuthPossible, isSendAuthInfoResponseHeaders, login, logout, notify, reauthenticateFromSSO, register, register, setAllowCorsPreflight, setAlwaysUseSession, setCache, setChangeSessionIdOnAuthentication, setContainer, setDisableProxyCaching, setJaspicCallbackHandlerClass, setSecurePagesWithPragma, setSecureRandomAlgorithm, setSecureRandomClass, setSecureRandomProvider, setSendAuthInfoResponseHeaders, startInternal, stopInternal
 - 
Methods inherited from class org.apache.catalina.valves.ValveBasebackgroundProcess, getDomainInternal, getNext, getObjectNameKeyProperties, initInternal, isAsyncSupported, setAsyncSupported, setNext, toString
 - 
Methods inherited from class org.apache.catalina.util.LifecycleMBeanBasedestroyInternal, getDomain, getObjectName, postDeregister, postRegister, preDeregister, preRegister, register, setDomain, unregister
 - 
Methods inherited from class org.apache.catalina.util.LifecycleBaseaddLifecycleListener, destroy, findLifecycleListeners, fireLifecycleEvent, getState, getStateName, getThrowOnFailure, init, removeLifecycleListener, setState, setState, setThrowOnFailure, start, stop
 
- 
 
- 
- 
- 
Field Detail- 
CURRENT_WINDOWS_IDENTITY_METHODprotected static final String CURRENT_WINDOWS_IDENTITY_METHOD - See Also:
- Constant Field Values
 
 - 
CURRENT_WINDOWS_IDENTITY_AUTH_SCHEMEprotected static final String CURRENT_WINDOWS_IDENTITY_AUTH_SCHEME - See Also:
- Constant Field Values
 
 - 
loggerprotected final Log logger 
 - 
smprotected final StringManager sm 
 - 
KRB5_MECHANISMprotected static final Oid KRB5_MECHANISM 
 - 
SPNEGO_MECHANISMprotected static final Oid SPNEGO_MECHANISM 
 
- 
 - 
Method Detail- 
doAuthenticateprotected boolean doAuthenticate(Request request, HttpServletResponse response) throws IOException - Specified by:
- doAuthenticatein class- AuthenticatorBase
- Throws:
- IOException
 
 - 
getAuthMethodprotected String getAuthMethod() - Specified by:
- getAuthMethodin class- AuthenticatorBase
 
 - 
setLoginEntryNamepublic void setLoginEntryName(String loginEntryName) Sets the login entry name which establishes the security context.- Parameters:
- loginEntryName- the login entry name
 
 - 
getLoginEntryNamepublic String getLoginEntryName() Returns the configured login entry name.- Returns:
- the login entry name
 
 - 
isOmitErrorMessagespublic boolean isOmitErrorMessages() Indicates whether error messages are responded to the client.- Returns:
- indicator for error message omission
 
 - 
setOmitErrorMessagespublic void setOmitErrorMessages(boolean omitErrorMessages) Sets whether error messages are responded to the client.- Parameters:
- omitErrorMessages- indicator to error omit messages
 
 - 
isErrorMessagesAsHeaderspublic boolean isErrorMessagesAsHeaders() Indicates whether error messages will be responded as headers.- Returns:
- indicates whether error messages will be responded as headers
 
 - 
setErrorMessagesAsHeaderspublic void setErrorMessagesAsHeaders(boolean errorMessagesAsHeaders) Sets whether error messages will be returned as headers.It is not always desired or necessary to produce an error page, e.g., non-interactive clients do not analyze it anyway, but have to consume the response (wasted time and resources). When a client issues a request, the server will write the error messages to either one header: Auth-ErrororServer-Error.Technically speaking, HttpServletResponse.setStatus(int)will be called instead ofHttpServletResponse.sendError(int, String).- Parameters:
- errorMessagesAsHeaders- indicates whether error messages will be responded as headers
 
 - 
isStoreDelegatedCredentialpublic boolean isStoreDelegatedCredential() Indicates whether client's (initiator's) delegated credential is stored in the user principal.- Returns:
- indicates whether client's (initiator's) delegated credential is stored in the user principal.
 
 - 
setStoreDelegatedCredentialpublic void setStoreDelegatedCredential(boolean storeDelegatedCredential) Sets whether client's (initiator's) delegated credential is stored in the user principal.- Parameters:
- storeDelegatedCredential- the store delegated credential indication
 
 - 
respondErrorMessageprotected void respondErrorMessage(Request request, HttpServletResponse response, int statusCode, String messageKey, Object... params) throws IOException - Throws:
- IOException
 
 - 
sendInternalServerErrorprotected void sendInternalServerError(Request request, HttpServletResponse response, String messageKey, Object... params) throws IOException - Throws:
- IOException
 
 - 
sendUnauthorizedprotected void sendUnauthorized(Request request, HttpServletResponse response, String scheme) throws IOException - Throws:
- IOException
 
 - 
sendUnauthorizedprotected void sendUnauthorized(Request request, HttpServletResponse response, String scheme, String messageKey, Object... params) throws IOException - Throws:
- IOException
 
 
- 
 
-