gluu
静的公開メンバ関数 | 限定公開メンバ関数 | 限定公開変数類 | 全メンバ一覧
org.gluu.oxauth.client.session.AbstractOAuthFilter クラスabstract
org.gluu.oxauth.client.session.AbstractOAuthFilter の継承関係図
Inheritance graph
org.gluu.oxauth.client.session.AbstractOAuthFilter 連携図
Collaboration graph

静的公開メンバ関数

static String getParameter (final HttpServletRequest request, final String parameter)
 

限定公開メンバ関数

final String constructRedirectUrl (final HttpServletRequest request)
 
final String getPropertyFromInitParams (final FilterConfig filterConfig, final String propertyName, final String defaultValue)
 

限定公開変数類

final Log log = LogFactory.getLog(getClass())
 

詳解

Abstract filter that contains code that is common to all OAuth filters.

著者
Yuriy Movchan
バージョン
0.1, 03/20/2013

関数詳解

◆ constructRedirectUrl()

final String org.gluu.oxauth.client.session.AbstractOAuthFilter.constructRedirectUrl ( final HttpServletRequest  request)
inlineprotected
21  {
22  int serverPort = request.getServerPort();
23 
24  String redirectUrl;
25  if ((serverPort == 80) || (serverPort == 443)) {
26  redirectUrl = String.format("%s://%s%s%s", request.getScheme(), request.getServerName(), request.getContextPath(), "/auth-code.jsp");
27  } else {
28  redirectUrl = String.format("%s://%s:%s%s%s", request.getScheme(), request.getServerName(), request.getServerPort(), request.getContextPath(), "/auth-code.jsp");
29  }
30 
31  return redirectUrl.toLowerCase();
32  }

◆ getParameter()

static String org.gluu.oxauth.client.session.AbstractOAuthFilter.getParameter ( final HttpServletRequest  request,
final String  parameter 
)
inlinestatic

Method for retrieving a parameter from the request without disrupting the reader UNLESS the parameter actually exists in the query string.

引数
requestthe request to check.
parameterthe parameter to look for.
戻り値
the value of the parameter.
42  {
43  return request.getQueryString() == null || request.getQueryString().indexOf(parameter) == -1 ? null : request.getParameter(parameter);
44  }

◆ getPropertyFromInitParams()

final String org.gluu.oxauth.client.util.AbstractConfigurationFilter.getPropertyFromInitParams ( final FilterConfig  filterConfig,
final String  propertyName,
final String  defaultValue 
)
inlineprotectedinherited

Retrieves the property from the FilterConfig. First it checks the FilterConfig's initParameters to see if it has a value. If it does, it returns that, otherwise it retrieves the ServletContext's initParameters and returns that value if any.

引数
filterConfigthe Filter Configuration.
propertyNamethe property to retrieve.
defaultValuethe default value if the property is not found.
戻り値
the property value, following the above conventions. It will always return the more specific value (i.e. filter vs. context).
35  {
36 // final String value = filterConfig.getInitParameter(propertyName);
37 //
38 // if (StringHelper.isNotEmpty(value)) {
39 // log.info("Property [" + propertyName + "] loaded from FilterConfig.getInitParameter with value [" + value + "]");
40 // return value;
41 // }
42 //
43 // final String value2 = filterConfig.getServletContext().getInitParameter(propertyName);
44 // if (StringHelper.isNotEmpty(value2)) {
45 // log.info("Property [" + propertyName + "] loaded from ServletContext.getInitParameter with value [" + value2 + "]");
46 // return value2;
47 // }
48 
49  final String value3 = Configuration.instance().getPropertyValue(propertyName);
50  if (StringHelper.isNotEmpty(value3)) {
51  log.info("Property [" + propertyName + "] loaded from oxTrust.properties");
52  return value3;
53  }
54 
55  log.info("Property [" + propertyName + "] not found. Using default value [" + defaultValue + "]");
56  return defaultValue;
57  }
final Log log
Definition: AbstractConfigurationFilter.java:24

メンバ詳解

◆ log

final Log org.gluu.oxauth.client.util.AbstractConfigurationFilter.log = LogFactory.getLog(getClass())
protectedinherited

このクラス詳解は次のファイルから抽出されました: