de.cidaas.oauth.interceptor.CBBearerBodyTokenExtractor Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of cidaas-interceptor-java Show documentation
Show all versions of cidaas-interceptor-java Show documentation
Interceptor for Cidaas Java Clients
package de.cidaas.oauth.interceptor;
import javax.servlet.http.HttpServletRequest;
import org.apache.oltu.oauth2.rs.extractor.BearerBodyTokenExtractor;
/**
* The Class CBBearerBodyTokenExtractor.
*
* @author michael
*/
class CBBearerBodyTokenExtractor extends BearerBodyTokenExtractor {
/*
* (non-Javadoc)
*
* @see org.apache.oltu.oauth2.rs.extractor.BearerBodyTokenExtractor#
* getAccessToken (javax.servlet.http.HttpServletRequest)
*/
@Override
public String getAccessToken(HttpServletRequest request) {
String token = request.getParameter(Constants.get_tokenKey());
if (token == null) {
token = super.getAccessToken(request);
}
return token;
}
}