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

公開メンバ関数

String getContentType ()
 
void setContentType (String contentType)
 
String getMediaType ()
 
void setMediaType (String mediaType)
 
String getAuthUsername ()
 
void setAuthUsername (String authUsername)
 
String getAuthPassword ()
 
void setAuthPassword (String authPassword)
 
AuthenticationMethod getAuthenticationMethod ()
 
void setAuthenticationMethod (AuthenticationMethod authenticationMethod)
 
AuthorizationMethod getAuthorizationMethod ()
 
void setAuthorizationMethod (AuthorizationMethod authorizationMethod)
 
Map< String, String > getCustomParameters ()
 
void addCustomParameter (String paramName, String paramValue)
 
boolean hasCredentials ()
 
String getCredentials () throws UnsupportedEncodingException
 
String getEncodedCredentials ()
 
Map< String, String > getParameters ()
 
JSONObject getJSONParameters () throws JSONException
 
abstract String getQueryString ()
 
 getAuthUsername ()
 
 setAuthUsername ($authUsername)
 
 getAuthPassword ()
 
 setAuthPassword ($authPassword)
 
 getCustomParameters ()
 
 addCustomParameter ($paramName, $paramValue)
 
 hasCredentials ()
 
 getCredentials ()
 
 getEncodedCredentials ()
 
 getParameters ()
 
 queryString ()
 

限定公開メンバ関数

 BaseRequest ()
 
 __construct ()
 

非公開変数類

String contentType
 
String mediaType
 
String authUsername
 
String authPassword
 
AuthenticationMethod authenticationMethod
 
AuthorizationMethod authorizationMethod
 
Map< String, String > customParameters
 
 $EMPTY_MAP = array()
 
 $authUsername
 
 $authPassword
 
 $customParameters
 

静的非公開変数類

static final Map< String, String > EMPTY_MAP = new HashMap<String, String>()
 
static final JSONObject EMPTY_JSON_OBJECT = new JSONObject()
 

詳解

著者
Javier Rojas Blum
バージョン
January 26. 2018
著者
Gabin Dongmo 29/03/2013

構築子と解体子

◆ BaseRequest()

org.xdi.oxauth.client.BaseRequest.BaseRequest ( )
inlineprotected
38  {
39  customParameters = new HashMap<String, String>();
40  }
Map< String, String > customParameters
Definition: BaseRequest.java:36

◆ __construct()

org.xdi.oxauth.client.BaseRequest.__construct ( )
protected
15  {
16  $this->customParameters = array();
17  }
Map< String, String > customParameters
Definition: BaseRequest.java:36

関数詳解

◆ addCustomParameter() [1/2]

org.xdi.oxauth.client.BaseRequest.addCustomParameter (   $paramName,
  $paramValue 
)
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 
)
inline
94  {
95  customParameters.put(paramName, paramValue);
96  }
Map< String, String > customParameters
Definition: BaseRequest.java:36

◆ getAuthenticationMethod()

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

◆ getAuthorizationMethod()

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

◆ getAuthPassword() [1/2]

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

◆ getAuthPassword() [2/2]

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

◆ getAuthUsername() [1/2]

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

◆ getAuthUsername() [2/2]

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

◆ getContentType()

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

◆ getCredentials() [1/2]

org.xdi.oxauth.client.BaseRequest.getCredentials ( )
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
inline

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 ( )
35  {
37  }
$customParameters
Definition: BaseRequest.php:13

◆ getCustomParameters() [2/2]

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

◆ getEncodedCredentials() [1/2]

org.xdi.oxauth.client.BaseRequest.getEncodedCredentials ( )
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 ( )
inline

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

◆ getJSONParameters()

JSONObject org.xdi.oxauth.client.BaseRequest.getJSONParameters ( ) throws JSONException
inline
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 ( )
inline
50  {
51  return mediaType;
52  }
String mediaType
Definition: BaseRequest.java:31

◆ getParameters() [1/2]

org.xdi.oxauth.client.BaseRequest.getParameters ( )
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 ( )
inline
132  {
133  return EMPTY_MAP;
134  }
static final Map< String, String > EMPTY_MAP
Definition: BaseRequest.java:27

◆ getQueryString()

abstract String org.xdi.oxauth.client.BaseRequest.getQueryString ( )
abstract

◆ hasCredentials() [1/2]

org.xdi.oxauth.client.BaseRequest.hasCredentials ( )
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 ( )
inline
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 ( )
abstract

◆ setAuthenticationMethod()

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

◆ setAuthorizationMethod()

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

◆ setAuthPassword() [1/2]

org.xdi.oxauth.client.BaseRequest.setAuthPassword (   $authPassword)
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)
inline
70  {
72  }
String authPassword
Definition: BaseRequest.java:33

◆ setAuthUsername() [1/2]

org.xdi.oxauth.client.BaseRequest.setAuthUsername (   $authUsername)
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)
inline
62  {
64  }
String authUsername
Definition: BaseRequest.java:32

◆ setContentType()

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

◆ setMediaType()

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

メンバ詳解

◆ $authPassword

org.xdi.oxauth.client.BaseRequest.$authPassword
private

◆ $authUsername

org.xdi.oxauth.client.BaseRequest.$authUsername
private

◆ $customParameters

org.xdi.oxauth.client.BaseRequest.$customParameters
private

◆ $EMPTY_MAP

org.xdi.oxauth.client.BaseRequest.$EMPTY_MAP = array()
private

◆ authenticationMethod

AuthenticationMethod org.xdi.oxauth.client.BaseRequest.authenticationMethod
private

◆ authorizationMethod

AuthorizationMethod org.xdi.oxauth.client.BaseRequest.authorizationMethod
private

◆ authPassword

String org.xdi.oxauth.client.BaseRequest.authPassword
private

◆ authUsername

String org.xdi.oxauth.client.BaseRequest.authUsername
private

◆ contentType

String org.xdi.oxauth.client.BaseRequest.contentType
private

◆ customParameters

Map<String, String> org.xdi.oxauth.client.BaseRequest.customParameters
private

◆ EMPTY_JSON_OBJECT

final JSONObject org.xdi.oxauth.client.BaseRequest.EMPTY_JSON_OBJECT = new JSONObject()
staticprivate

◆ EMPTY_MAP

final Map<String, String> org.xdi.oxauth.client.BaseRequest.EMPTY_MAP = new HashMap<String, String>()
staticprivate

◆ mediaType

String org.xdi.oxauth.client.BaseRequest.mediaType
private

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