public class HttpHeaderPrincipalProvider extends Object
PrincipalProvider
Modifier and Type | Class and Description |
---|---|
static class |
HttpHeaderPrincipalProvider.HttpHeaderPrincipal |
Constructor and Description |
---|
HttpHeaderPrincipalProvider() |
Modifier and Type | Method and Description |
---|---|
protected Principal |
createPrincipal(String name) |
void |
destroy() |
void |
doFilter(javax.servlet.ServletRequest request,
javax.servlet.ServletResponse response,
javax.servlet.FilterChain chain) |
Set<Principal> |
getPrincipals(javax.servlet.http.HttpServletRequest request)
Extract principals from the provided HttpServletRequest.
|
void |
init(javax.servlet.FilterConfig filterConfig) |
void |
setHeaderName(String headerName) |
void |
setSeparator(String separator) |
public HttpHeaderPrincipalProvider()
public void setHeaderName(String headerName)
headerName
- The name of the header from which to extract principalspublic void setSeparator(String separator)
separator
- The string by which to split header valuespublic Set<Principal> getPrincipals(javax.servlet.http.HttpServletRequest request)
PrincipalProvider
If no principals can be extracted, implementations of this method should return the empty set rather than null.
request
- the requestprotected Principal createPrincipal(String name)
public void init(javax.servlet.FilterConfig filterConfig)
init
in interface javax.servlet.Filter
public void doFilter(javax.servlet.ServletRequest request, javax.servlet.ServletResponse response, javax.servlet.FilterChain chain) throws IOException, javax.servlet.ServletException
doFilter
in interface javax.servlet.Filter
IOException
javax.servlet.ServletException
public void destroy()
destroy
in interface javax.servlet.Filter
Copyright © 2013–2019 DuraSpace, Inc.. All rights reserved.