|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.springframework.web.filter.GenericFilterBean org.springframework.security.web.authentication.AbstractAuthenticationProcessingFilter org.springframework.security.openid.OpenIDAuthenticationFilter
public class OpenIDAuthenticationFilter
Filter which processes OpenID authentication requests.
The OpenID authentication involves two stages.
OpenIDAuthenticationProvider
Field Summary | |
---|---|
static String |
DEFAULT_CLAIMED_IDENTITY_FIELD
|
Fields inherited from class org.springframework.security.web.authentication.AbstractAuthenticationProcessingFilter |
---|
authenticationDetailsSource, eventPublisher, messages, SPRING_SECURITY_LAST_EXCEPTION_KEY |
Fields inherited from class org.springframework.web.filter.GenericFilterBean |
---|
logger |
Constructor Summary | |
---|---|
OpenIDAuthenticationFilter()
|
Method Summary | |
---|---|
void |
afterPropertiesSet()
|
Authentication |
attemptAuthentication(HttpServletRequest request,
HttpServletResponse response)
Authentication has two phases. |
protected String |
buildReturnToUrl(HttpServletRequest request)
Builds the return_to URL that will be sent to the OpenID service provider. |
protected String |
lookupRealm(String returnToUrl)
|
protected String |
obtainUsername(HttpServletRequest req)
Reads the claimedIdentityFieldName from the submitted request. |
void |
setClaimedIdentityFieldName(String claimedIdentityFieldName)
The name of the request parameter containing the OpenID identity, as submitted from the initial login form. |
void |
setConsumer(OpenIDConsumer consumer)
|
void |
setRealmMapping(Map<String,String> realmMapping)
Maps the return_to url to a realm, for example: http://www.example.com/j_spring_openid_security_check -> http://www.example.com/realm If no mapping is provided then the returnToUrl will be parsed to extract the protocol, hostname and port followed by a trailing slash. |
Methods inherited from class org.springframework.web.filter.GenericFilterBean |
---|
addRequiredProperty, destroy, getFilterConfig, getFilterName, getServletContext, init, initBeanWrapper, initFilterBean, setBeanName, setServletContext |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final String DEFAULT_CLAIMED_IDENTITY_FIELD
Constructor Detail |
---|
public OpenIDAuthenticationFilter()
Method Detail |
---|
public void afterPropertiesSet()
afterPropertiesSet
in interface InitializingBean
afterPropertiesSet
in class AbstractAuthenticationProcessingFilter
public Authentication attemptAuthentication(HttpServletRequest request, HttpServletResponse response) throws AuthenticationException, IOException
attemptAuthentication
in class AbstractAuthenticationProcessingFilter
request
- from which to extract parameters and perform the authenticationresponse
- the response, which may be needed if the implementation has to do a redirect as part of a
multi-stage authentication process (such as OpenID).
AuthenticationException
- if authentication fails.
IOException
protected String lookupRealm(String returnToUrl)
protected String buildReturnToUrl(HttpServletRequest request)
request
- the current request which is being processed by this filter
protected String obtainUsername(HttpServletRequest req)
public void setRealmMapping(Map<String,String> realmMapping)
http://www.example.com/j_spring_openid_security_check -> http://www.example.com/realmIf no mapping is provided then the returnToUrl will be parsed to extract the protocol, hostname and port followed by a trailing slash. This means that http://www.example.com/j_spring_openid_security_check will automatically become http://www.example.com:80/
realmMapping
- containing returnToUrl -> realm mappingspublic void setClaimedIdentityFieldName(String claimedIdentityFieldName)
claimedIdentityFieldName
- defaults to "openid_identifier"public void setConsumer(OpenIDConsumer consumer)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |