gluu
公開メンバ関数 | 限定公開メンバ関数 | 限定公開変数類 | 非公開変数類 | 全メンバ一覧
org.xdi.oxauth.service.external.context.DynamicScopeExternalContext クラス
org.xdi.oxauth.service.external.context.DynamicScopeExternalContext の継承関係図
Inheritance graph
org.xdi.oxauth.service.external.context.DynamicScopeExternalContext 連携図
Collaboration graph

公開メンバ関数

 DynamicScopeExternalContext (List< Scope > dynamicScopes, JsonWebResponse jsonWebResponse, IAuthorizationGrant authorizationGrant)
 
List< String > getDynamicScopes ()
 
List< ScopegetScopes ()
 
JsonWebResponse getJsonWebResponse ()
 
IAuthorizationGrant getAuthorizationGrant ()
 
User getUser ()
 
Logger getLog ()
 
PersistenceEntryManager getPersistenceEntryManager ()
 
HttpServletRequest getHttpRequest ()
 
HttpServletResponse getHttpResponse ()
 
String getIpAddress ()
 
boolean isInNetwork (String cidrNotation)
 

限定公開メンバ関数

CustomEntry getEntryByDn (String dn, String ... ldapReturnAttributes)
 
String getEntryAttributeValue (String dn, String attributeName)
 

限定公開変数類

HttpServletRequest httpRequest
 
final HttpServletResponse httpResponse
 

非公開変数類

List< ScopedynamicScopes
 
JsonWebResponse jsonWebResponse
 
IAuthorizationGrant authorizationGrant
 

詳解

Holds object required in dynamic scope custom scripts

著者
Yuriy Movchan Date: 07/01/2015

構築子と解体子

◆ DynamicScopeExternalContext()

org.xdi.oxauth.service.external.context.DynamicScopeExternalContext.DynamicScopeExternalContext ( List< Scope dynamicScopes,
JsonWebResponse  jsonWebResponse,
IAuthorizationGrant  authorizationGrant 
)
inline
29  {
30  super(null);
31 
35  }
IAuthorizationGrant authorizationGrant
Definition: DynamicScopeExternalContext.java:27
JsonWebResponse jsonWebResponse
Definition: DynamicScopeExternalContext.java:26
List< Scope > dynamicScopes
Definition: DynamicScopeExternalContext.java:25

関数詳解

◆ getAuthorizationGrant()

IAuthorizationGrant org.xdi.oxauth.service.external.context.DynamicScopeExternalContext.getAuthorizationGrant ( )
inline
60  {
61  return authorizationGrant;
62  }
IAuthorizationGrant authorizationGrant
Definition: DynamicScopeExternalContext.java:27

◆ getDynamicScopes()

List<String> org.xdi.oxauth.service.external.context.DynamicScopeExternalContext.getDynamicScopes ( )
inline

This method is used by scripts.

戻り値
dynamic scopes as string
42  {
43  List<String> scopes = new ArrayList<String>();
44  if (dynamicScopes != null) {
45  for (Scope scope : dynamicScopes) {
46  scopes.add(scope.getDisplayName());
47  }
48  }
49  return scopes;
50  }
List< Scope > dynamicScopes
Definition: DynamicScopeExternalContext.java:25

◆ getEntryAttributeValue()

String org.xdi.oxauth.service.external.context.ExternalScriptContext.getEntryAttributeValue ( String  dn,
String  attributeName 
)
inlineprotectedinherited
96  {
97  final CustomEntry entry = getEntryByDn(dn, attributeName);
98  if (entry != null) {
99  final String attributeValue = entry.getCustomAttributeValue(attributeName);
100  return attributeValue;
101  }
102 
103  return "";
104  }
CustomEntry getEntryByDn(String dn, String ... ldapReturnAttributes)
Definition: ExternalScriptContext.java:86

◆ getEntryByDn()

CustomEntry org.xdi.oxauth.service.external.context.ExternalScriptContext.getEntryByDn ( String  dn,
String ...  ldapReturnAttributes 
)
inlineprotectedinherited
86  {
87  try {
88  return ldapEntryManager.find(CustomEntry.class, dn, ldapReturnAttributes);
89  } catch (EntryPersistenceException epe) {
90  log.error("Failed to find entry '{}'", dn);
91  }
92 
93  return null;
94  }
static final Logger log
Definition: ExternalScriptContext.java:31
final PersistenceEntryManager ldapEntryManager
Definition: ExternalScriptContext.java:33

◆ getHttpRequest()

HttpServletRequest org.xdi.oxauth.service.external.context.ExternalScriptContext.getHttpRequest ( )
inlineinherited
65  {
66  return httpRequest;
67  }
HttpServletRequest httpRequest
Definition: ExternalScriptContext.java:34

◆ getHttpResponse()

HttpServletResponse org.xdi.oxauth.service.external.context.ExternalScriptContext.getHttpResponse ( )
inlineinherited
69  {
70  return httpResponse;
71  }
final HttpServletResponse httpResponse
Definition: ExternalScriptContext.java:35

◆ getIpAddress()

String org.xdi.oxauth.service.external.context.ExternalScriptContext.getIpAddress ( )
inlineinherited
73  {
74  return httpRequest != null ? httpRequest.getRemoteAddr() : "";
75  }
HttpServletRequest httpRequest
Definition: ExternalScriptContext.java:34

◆ getJsonWebResponse()

JsonWebResponse org.xdi.oxauth.service.external.context.DynamicScopeExternalContext.getJsonWebResponse ( )
inline
56  {
57  return jsonWebResponse;
58  }
JsonWebResponse jsonWebResponse
Definition: DynamicScopeExternalContext.java:26

◆ getLog()

Logger org.xdi.oxauth.service.external.context.ExternalScriptContext.getLog ( )
inlineinherited
57  {
58  return log;
59  }
static final Logger log
Definition: ExternalScriptContext.java:31

◆ getPersistenceEntryManager()

PersistenceEntryManager org.xdi.oxauth.service.external.context.ExternalScriptContext.getPersistenceEntryManager ( )
inlineinherited
61  {
62  return ldapEntryManager;
63  }
final PersistenceEntryManager ldapEntryManager
Definition: ExternalScriptContext.java:33

◆ getScopes()

List<Scope> org.xdi.oxauth.service.external.context.DynamicScopeExternalContext.getScopes ( )
inline
52  {
53  return dynamicScopes;
54  }
List< Scope > dynamicScopes
Definition: DynamicScopeExternalContext.java:25

◆ getUser()

User org.xdi.oxauth.service.external.context.DynamicScopeExternalContext.getUser ( )
inline
64  {
65  return authorizationGrant.getUser();
66  }
IAuthorizationGrant authorizationGrant
Definition: DynamicScopeExternalContext.java:27

◆ isInNetwork()

boolean org.xdi.oxauth.service.external.context.ExternalScriptContext.isInNetwork ( String  cidrNotation)
inlineinherited
77  {
78  final String ip = getIpAddress();
79  if (Util.allNotBlank(ip, cidrNotation)) {
80  final SubnetUtils utils = new SubnetUtils(cidrNotation);
81  return utils.getInfo().isInRange(ip);
82  }
83  return false;
84  }
String getIpAddress()
Definition: ExternalScriptContext.java:73

メンバ詳解

◆ authorizationGrant

IAuthorizationGrant org.xdi.oxauth.service.external.context.DynamicScopeExternalContext.authorizationGrant
private

◆ dynamicScopes

List<Scope> org.xdi.oxauth.service.external.context.DynamicScopeExternalContext.dynamicScopes
private

◆ httpRequest

HttpServletRequest org.xdi.oxauth.service.external.context.ExternalScriptContext.httpRequest
protectedinherited

◆ httpResponse

final HttpServletResponse org.xdi.oxauth.service.external.context.ExternalScriptContext.httpResponse
protectedinherited

◆ jsonWebResponse

JsonWebResponse org.xdi.oxauth.service.external.context.DynamicScopeExternalContext.jsonWebResponse
private

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