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

公開メンバ関数

 OpenIdConnectDiscoveryRequest (String resource) throws URISyntaxException
 
String getResource ()
 
void setResource (String resource)
 
String getHost ()
 
void setHost (String host)
 
String getPath ()
 
void setPath (String path)
 
String getQueryString ()
 
String getContentType ()
 
void setContentType (String contentType)
 
String getMediaType ()
 
void setMediaType (String mediaType)
 
String getAuthUsername ()
 
 getAuthUsername ()
 
void setAuthUsername (String authUsername)
 
 setAuthUsername ($authUsername)
 
String getAuthPassword ()
 
 getAuthPassword ()
 
void setAuthPassword (String authPassword)
 
 setAuthPassword ($authPassword)
 
AuthenticationMethod getAuthenticationMethod ()
 
void setAuthenticationMethod (AuthenticationMethod authenticationMethod)
 
AuthorizationMethod getAuthorizationMethod ()
 
void setAuthorizationMethod (AuthorizationMethod authorizationMethod)
 
Map< String, String > getCustomParameters ()
 
 getCustomParameters ()
 
void addCustomParameter (String paramName, String paramValue)
 
 addCustomParameter ($paramName, $paramValue)
 
boolean hasCredentials ()
 
 hasCredentials ()
 
String getCredentials () throws UnsupportedEncodingException
 
 getCredentials ()
 
String getEncodedCredentials ()
 
 getEncodedCredentials ()
 
Map< String, String > getParameters ()
 
 getParameters ()
 
JSONObject getJSONParameters () throws JSONException
 
 queryString ()
 

非公開変数類

String resource
 
String host
 
String path
 

詳解

著者
Javier Rojas Blum Date: 01.28.2013

構築子と解体子

◆ OpenIdConnectDiscoveryRequest()

org.xdi.oxauth.client.OpenIdConnectDiscoveryRequest.OpenIdConnectDiscoveryRequest ( String  resource) throws URISyntaxException
inline
29  {
30  this.resource = resource;
31 
32  if (StringUtils.isBlank(resource)) {
33  throw new IllegalArgumentException("Resource cannot be null");
34  }
35  if (resource.startsWith("=") || resource.startsWith("@") || resource.startsWith("!")) { // XRI
36  throw new UnsupportedOperationException("XRI is not supported"); // TODO: Add support for XRI
37  } else if (resource.contains("@")) { // email
38  this.host = resource.substring(resource.indexOf("@") + 1);
39  } else {
40  if (!resource.contains("://")) {
41  // If the user input Identifier does not have an RFC 3986 "scheme" portion,
42  // the string is interpreted as authority path-abempty [ "?" query ] [ "#" fragment ] of RFC 3986.
43  // In this case, the https scheme is assumed, and the normalized URL will be formed by prefixing
44  // https:// to the string.
45  resource = "https://" + resource;
46  }
47 
48  URI uri = new URI(resource);
49  this.host = uri.getHost();
50  if (uri.getPort() != -1) {
51  this.host += ":" + uri.getPort();
52  }
53  if (StringUtils.isNotBlank(uri.getPath()) && !uri.getPath().equals(uri.getHost()) && !uri.getPath().equals("/")) {
54  this.path = uri.getPath();
55  }
56  }
57  }
String path
Definition: OpenIdConnectDiscoveryRequest.java:27
String host
Definition: OpenIdConnectDiscoveryRequest.java:26
String resource
Definition: OpenIdConnectDiscoveryRequest.java:25

関数詳解

◆ addCustomParameter() [1/2]

org.xdi.oxauth.client.BaseRequest.addCustomParameter (   $paramName,
  $paramValue 
)
inherited
39  {
40  $this->customParameters[$paramName] = $paramValue;
41  }
Map< String, String > customParameters
Definition: BaseRequest.java:36

◆ addCustomParameter() [2/2]

void org.xdi.oxauth.client.BaseRequest.addCustomParameter ( String  paramName,
String  paramValue 
)
inlineinherited
94  {
95  customParameters.put(paramName, paramValue);
96  }
Map< String, String > customParameters
Definition: BaseRequest.java:36

◆ getAuthenticationMethod()

AuthenticationMethod org.xdi.oxauth.client.BaseRequest.getAuthenticationMethod ( )
inlineinherited
74  {
75  return authenticationMethod;
76  }
AuthenticationMethod authenticationMethod
Definition: BaseRequest.java:34

◆ getAuthorizationMethod()

AuthorizationMethod org.xdi.oxauth.client.BaseRequest.getAuthorizationMethod ( )
inlineinherited
82  {
83  return authorizationMethod;
84  }
AuthorizationMethod authorizationMethod
Definition: BaseRequest.java:35

◆ getAuthPassword() [1/2]

org.xdi.oxauth.client.BaseRequest.getAuthPassword ( )
inherited
27  {
28  return $this->authPassword;
29  }
$authPassword
Definition: BaseRequest.php:12

◆ getAuthPassword() [2/2]

String org.xdi.oxauth.client.BaseRequest.getAuthPassword ( )
inlineinherited
66  {
67  return authPassword;
68  }
String authPassword
Definition: BaseRequest.java:33

◆ getAuthUsername() [1/2]

org.xdi.oxauth.client.BaseRequest.getAuthUsername ( )
inherited
19  {
20  return $this->authUsername;
21  }
$authUsername
Definition: BaseRequest.php:11

◆ getAuthUsername() [2/2]

String org.xdi.oxauth.client.BaseRequest.getAuthUsername ( )
inlineinherited
58  {
59  return authUsername;
60  }
String authUsername
Definition: BaseRequest.java:32

◆ getContentType()

String org.xdi.oxauth.client.BaseRequest.getContentType ( )
inlineinherited
42  {
43  return contentType;
44  }
String contentType
Definition: BaseRequest.java:30

◆ getCredentials() [1/2]

org.xdi.oxauth.client.BaseRequest.getCredentials ( )
inherited
49  {
50  return $this->authUsername . ':' . $this->authPassword;
51  }
$authPassword
Definition: BaseRequest.php:12
String authUsername
Definition: BaseRequest.java:32

◆ getCredentials() [2/2]

String org.xdi.oxauth.client.BaseRequest.getCredentials ( ) throws UnsupportedEncodingException
inlineinherited

Returns the client credentials (URL encoded).

戻り値
The client credentials.
109  {
110  return URLEncoder.encode(authUsername, Util.UTF8_STRING_ENCODING)
111  + ":"
112  + URLEncoder.encode(authPassword, Util.UTF8_STRING_ENCODING);
113  }
String authPassword
Definition: BaseRequest.java:33
String authUsername
Definition: BaseRequest.java:32

◆ getCustomParameters() [1/2]

org.xdi.oxauth.client.BaseRequest.getCustomParameters ( )
inherited
35  {
37  }
$customParameters
Definition: BaseRequest.php:13

◆ getCustomParameters() [2/2]

Map<String, String> org.xdi.oxauth.client.BaseRequest.getCustomParameters ( )
inlineinherited
90  {
91  return customParameters;
92  }
Map< String, String > customParameters
Definition: BaseRequest.java:36

◆ getEncodedCredentials() [1/2]

org.xdi.oxauth.client.BaseRequest.getEncodedCredentials ( )
inherited
53  {
54  if($this->hasCredentials()){
55  return base64_encode($this->getCredentials());
56  }
57  return NULL;
58  }
boolean hasCredentials()
Definition: BaseRequest.java:98
String getCredentials()
Definition: BaseRequest.java:109

◆ getEncodedCredentials() [2/2]

String org.xdi.oxauth.client.BaseRequest.getEncodedCredentials ( )
inlineinherited

Returns the client credentials encoded using base64.

戻り値
The encoded client credentials.
120  {
121  try {
122  if (hasCredentials()) {
123  return Base64.encodeBase64String(Util.getBytes(getCredentials()));
124  }
125  } catch (UnsupportedEncodingException e) {
126  e.printStackTrace();
127  }
128 
129  return null;
130  }
boolean hasCredentials()
Definition: BaseRequest.java:98
String getCredentials()
Definition: BaseRequest.java:109

◆ getHost()

String org.xdi.oxauth.client.OpenIdConnectDiscoveryRequest.getHost ( )
inline

Returns the Server where a WebFinger service is hosted.

戻り値
The Server where a WebFinger service is hosted.
82  {
83  return host;
84  }
String host
Definition: OpenIdConnectDiscoveryRequest.java:26

◆ getJSONParameters()

JSONObject org.xdi.oxauth.client.BaseRequest.getJSONParameters ( ) throws JSONException
inlineinherited
136  {
137  return EMPTY_JSON_OBJECT;
138  }
static final JSONObject EMPTY_JSON_OBJECT
Definition: BaseRequest.java:28

◆ getMediaType()

String org.xdi.oxauth.client.BaseRequest.getMediaType ( )
inlineinherited
50  {
51  return mediaType;
52  }
String mediaType
Definition: BaseRequest.java:31

◆ getParameters() [1/2]

org.xdi.oxauth.client.BaseRequest.getParameters ( )
inherited
60  {
61  return $this->EMPTY_MAP;
62  }
$EMPTY_MAP
Definition: BaseRequest.php:10

◆ getParameters() [2/2]

Map<String, String> org.xdi.oxauth.client.BaseRequest.getParameters ( )
inlineinherited
132  {
133  return EMPTY_MAP;
134  }
static final Map< String, String > EMPTY_MAP
Definition: BaseRequest.java:27

◆ getPath()

String org.xdi.oxauth.client.OpenIdConnectDiscoveryRequest.getPath ( )
inline

If the Issuer value contains a path component, any terminating / must be removed before appending /.well-known/openid-configuration. Then the Client may make a new request using the path.

戻り値
The path component.
101  {
102  return path;
103  }
String path
Definition: OpenIdConnectDiscoveryRequest.java:27

◆ getQueryString()

String org.xdi.oxauth.client.OpenIdConnectDiscoveryRequest.getQueryString ( )
inline

Returns a query string with the parameters of the OpenID Connect Discovery request. Any null or empty parameter will be omitted.

戻り値
A query string of parameters.
121  {
122  StringBuilder queryStringBuilder = new StringBuilder();
123 
124  try {
125  addQueryStringParam(queryStringBuilder, RESOURCE, resource);
126  addQueryStringParam(queryStringBuilder, REL, REL_VALUE);
127  } catch (UnsupportedEncodingException e) {
128  e.printStackTrace();
129  }
130 
131  return queryStringBuilder.toString();
132  }
String resource
Definition: OpenIdConnectDiscoveryRequest.java:25

◆ getResource()

String org.xdi.oxauth.client.OpenIdConnectDiscoveryRequest.getResource ( )
inline

Returns the Identifier of the target End-User that is the subject of the discovery request.

戻り値
The Identifier of the target End-User that is the subject of the discovery request.
64  {
65  return resource;
66  }
String resource
Definition: OpenIdConnectDiscoveryRequest.java:25

◆ hasCredentials() [1/2]

org.xdi.oxauth.client.BaseRequest.hasCredentials ( )
inherited
43  {
44  return isset($this->authUsername, $this->authPassword)
45  && empty($this->authUsername)
46  && empty($this->authPassword);
47  }
String authPassword
Definition: BaseRequest.java:33
String authUsername
Definition: BaseRequest.java:32

◆ hasCredentials() [2/2]

boolean org.xdi.oxauth.client.BaseRequest.hasCredentials ( )
inlineinherited
98  {
99  return authUsername != null && authPassword != null
100  && !authUsername.isEmpty()
101  && !authPassword.isEmpty();
102  }
String authPassword
Definition: BaseRequest.java:33
String authUsername
Definition: BaseRequest.java:32

◆ queryString()

org.xdi.oxauth.client.BaseRequest.queryString ( )
abstractinherited

◆ setAuthenticationMethod()

void org.xdi.oxauth.client.BaseRequest.setAuthenticationMethod ( AuthenticationMethod  authenticationMethod)
inlineinherited
78  {
80  }
AuthenticationMethod authenticationMethod
Definition: BaseRequest.java:34

◆ setAuthorizationMethod()

void org.xdi.oxauth.client.BaseRequest.setAuthorizationMethod ( AuthorizationMethod  authorizationMethod)
inlineinherited
86  {
88  }
AuthorizationMethod authorizationMethod
Definition: BaseRequest.java:35

◆ setAuthPassword() [1/2]

org.xdi.oxauth.client.BaseRequest.setAuthPassword (   $authPassword)
inherited
31  {
32  $this->authPassword = $authPassword;
33  }
$authPassword
Definition: BaseRequest.php:12
String authPassword
Definition: BaseRequest.java:33

◆ setAuthPassword() [2/2]

void org.xdi.oxauth.client.BaseRequest.setAuthPassword ( String  authPassword)
inlineinherited
70  {
72  }
String authPassword
Definition: BaseRequest.java:33

◆ setAuthUsername() [1/2]

org.xdi.oxauth.client.BaseRequest.setAuthUsername (   $authUsername)
inherited
23  {
24  $this->authUsername = $authUsername;
25  }
$authUsername
Definition: BaseRequest.php:11
String authUsername
Definition: BaseRequest.java:32

◆ setAuthUsername() [2/2]

void org.xdi.oxauth.client.BaseRequest.setAuthUsername ( String  authUsername)
inlineinherited
62  {
64  }
String authUsername
Definition: BaseRequest.java:32

◆ setContentType()

void org.xdi.oxauth.client.BaseRequest.setContentType ( String  contentType)
inlineinherited
46  {
47  this.contentType = contentType;
48  }
String contentType
Definition: BaseRequest.java:30

◆ setHost()

void org.xdi.oxauth.client.OpenIdConnectDiscoveryRequest.setHost ( String  host)
inline

Sets the Server where a WebFinger service is hosted.

引数
hostThe Server where a WebFinger service is hosted.
91  {
92  this.host = host;
93  }
String host
Definition: OpenIdConnectDiscoveryRequest.java:26

◆ setMediaType()

void org.xdi.oxauth.client.BaseRequest.setMediaType ( String  mediaType)
inlineinherited
54  {
55  this.mediaType = mediaType;
56  }
String mediaType
Definition: BaseRequest.java:31

◆ setPath()

void org.xdi.oxauth.client.OpenIdConnectDiscoveryRequest.setPath ( String  path)
inline

Sets the path component.

引数
pathThe path component.
110  {
111  this.path = path;
112  }
String path
Definition: OpenIdConnectDiscoveryRequest.java:27

◆ setResource()

void org.xdi.oxauth.client.OpenIdConnectDiscoveryRequest.setResource ( String  resource)
inline

Sets the Identifier of the target End-User that is the subject of the discovery request.

引数
resourceThe Identifier of the target End-User that is the subject of the discovery request.
73  {
74  this.resource = resource;
75  }
String resource
Definition: OpenIdConnectDiscoveryRequest.java:25

メンバ詳解

◆ host

String org.xdi.oxauth.client.OpenIdConnectDiscoveryRequest.host
private

◆ path

String org.xdi.oxauth.client.OpenIdConnectDiscoveryRequest.path
private

◆ resource

String org.xdi.oxauth.client.OpenIdConnectDiscoveryRequest.resource
private

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