@Override
public void init(FilterConfig filterConfig) throws PortletException {
this.filterConfig = filterConfig;
String accessTokenValidation = filterConfig.getInitParameter(INIT_PARAM_ACCESS_TOKEN_VALIDATION);
if (AccessTokenValidation.ALWAYS.name().equals(accessTokenValidation)) {
this.accessTokenValidation = AccessTokenValidation.ALWAYS;
} else if (AccessTokenValidation.SKIP.name().equals(accessTokenValidation)) {
this.accessTokenValidation = AccessTokenValidation.SKIP;
} else {
// SESSION is default validation type
this.accessTokenValidation = AccessTokenValidation.SESSION;
}
this.oauthProviderKey = filterConfig.getInitParameter(INIT_PARAM_OAUTH_PROVIDER_KEY);
if (oauthProviderKey == null) {
throw new PortletException("Init parameter '" + INIT_PARAM_OAUTH_PROVIDER_KEY + "' needs to be provided");
}
}
OAuthPortletFilter.java 文件源码
java
阅读 15
收藏 0
点赞 0
评论 0
项目:docs-samples
作者:
评论列表
文章目录