public class NuxeoOAuth2Filter extends Object implements NuxeoAuthPreFilter
Modifier and Type | Class and Description |
---|---|
static class |
NuxeoOAuth2Filter.ERRORS |
Modifier and Type | Field and Description |
---|---|
static String |
AUTHORIZATION_KEY |
static String |
CLIENTNAME_KEY |
protected static String |
ENDPOINT_AUTH |
protected static String |
ENDPOINT_TOKEN |
protected static String |
OAUTH2_SEGMENT |
protected static String |
TOKEN_SERVICE |
static String |
USERNAME_KEY |
Constructor and Description |
---|
NuxeoOAuth2Filter() |
Modifier and Type | Method and Description |
---|---|
protected LoginContext |
buildLoginContext(NuxeoOAuth2Token token) |
void |
doFilter(javax.servlet.ServletRequest request,
javax.servlet.ServletResponse response,
javax.servlet.FilterChain chain)
Main Filter method
Filter . |
protected OAuth2TokenStore |
getTokenStore() |
protected void |
handleError(NuxeoOAuth2Filter.ERRORS error,
javax.servlet.http.HttpServletRequest request,
javax.servlet.http.HttpServletResponse response) |
protected void |
handleError(String error,
javax.servlet.http.HttpServletRequest request,
javax.servlet.http.HttpServletResponse response) |
protected void |
handleJsonError(NuxeoOAuth2Filter.ERRORS error,
javax.servlet.http.HttpServletRequest request,
javax.servlet.http.HttpServletResponse response) |
protected void |
handleTokenResponse(NuxeoOAuth2Token token,
javax.servlet.http.HttpServletResponse response) |
protected boolean |
isAuthorizedRequest(javax.servlet.http.HttpServletRequest request) |
protected boolean |
isValid(javax.servlet.ServletRequest request) |
protected void |
process(javax.servlet.ServletRequest request,
javax.servlet.ServletResponse response,
javax.servlet.FilterChain chain) |
protected void |
processAuthentication(javax.servlet.http.HttpServletRequest request,
javax.servlet.http.HttpServletResponse response,
javax.servlet.FilterChain chain) |
protected void |
processAuthorization(javax.servlet.http.HttpServletRequest request,
javax.servlet.http.HttpServletResponse response,
javax.servlet.FilterChain chain) |
protected void |
processToken(javax.servlet.http.HttpServletRequest request,
javax.servlet.http.HttpServletResponse response,
javax.servlet.FilterChain chain) |
protected void |
sendRedirect(javax.servlet.http.HttpServletResponse response,
String uri,
Map<String,String> params) |
protected static final String TOKEN_SERVICE
protected static final String OAUTH2_SEGMENT
protected static final String ENDPOINT_AUTH
protected static final String ENDPOINT_TOKEN
public static String USERNAME_KEY
public static String AUTHORIZATION_KEY
public static String CLIENTNAME_KEY
public NuxeoOAuth2Filter()
public void doFilter(javax.servlet.ServletRequest request, javax.servlet.ServletResponse response, javax.servlet.FilterChain chain) throws IOException, javax.servlet.ServletException
NuxeoAuthPreFilter
Filter
. The FilterChain is only composed of the preFilters and the
NuxeoAuthenticationFilterdoFilter
in interface NuxeoAuthPreFilter
IOException
javax.servlet.ServletException
FilterChain
protected boolean isValid(javax.servlet.ServletRequest request)
protected void process(javax.servlet.ServletRequest request, javax.servlet.ServletResponse response, javax.servlet.FilterChain chain) throws IOException, javax.servlet.ServletException
IOException
javax.servlet.ServletException
protected void processAuthentication(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response, javax.servlet.FilterChain chain) throws IOException, javax.servlet.ServletException
IOException
javax.servlet.ServletException
protected LoginContext buildLoginContext(NuxeoOAuth2Token token)
protected boolean isAuthorizedRequest(javax.servlet.http.HttpServletRequest request)
protected void processAuthorization(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response, javax.servlet.FilterChain chain) throws IOException
IOException
protected void processToken(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response, javax.servlet.FilterChain chain) throws IOException
IOException
protected void handleTokenResponse(NuxeoOAuth2Token token, javax.servlet.http.HttpServletResponse response) throws IOException
IOException
protected void handleError(NuxeoOAuth2Filter.ERRORS error, javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response) throws IOException
IOException
protected void handleError(String error, javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response) throws IOException
IOException
protected void handleJsonError(NuxeoOAuth2Filter.ERRORS error, javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response) throws IOException
IOException
protected void sendRedirect(javax.servlet.http.HttpServletResponse response, String uri, Map<String,String> params) throws IOException
IOException
protected OAuth2TokenStore getTokenStore()
Copyright © 2015 Nuxeo SA. All rights reserved.