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

公開メンバ関数

 RegisterResponse ()
 
 RegisterResponse (ClientResponse< String > clientResponse)
 
RegisterErrorResponseType fromString (String p_string)
 
void injectDataFromJson ()
 
void injectDataFromJson (String p_json)
 
String getClientId ()
 
void setClientId (String clientId)
 
String getClientSecret ()
 
void setClientSecret (String clientSecret)
 
String getRegistrationAccessToken ()
 
void setRegistrationAccessToken (String registrationAccessToken)
 
String getRegistrationClientUri ()
 
void setRegistrationClientUri (String registrationClientUri)
 
Date getClientIdIssuedAt ()
 
void setClientIdIssuedAt (Date clientIdIssuedAt)
 
Date getClientSecretExpiresAt ()
 
void setClientSecretExpiresAt (Date clientSecretExpiresAt)
 
List< ResponseTypegetResponseTypes ()
 
void setResponseTypes (List< ResponseType > responseTypes)
 
List< GrantTypegetGrantTypes ()
 
void setGrantTypes (List< GrantType > grantTypes)
 
Map< String, String > getClaims ()
 
void setClaims (Map< String, String > claims)
 
String getErrorDescription ()
 
void setErrorDescription (String p_errorDescription)
 
getErrorType ()
 
void setErrorType (T p_errorType)
 
String getErrorUri ()
 
void setErrorUri (String p_errorUri)
 
void injectErrorIfExistSilently (JSONObject jsonObj) throws JSONException
 
void injectErrorIfExistSilently (String p_entity)
 

静的公開メンバ関数

static RegisterResponse valueOf (String p_json)
 

非公開変数類

String clientId
 
String clientSecret
 
String registrationAccessToken
 
String registrationClientUri
 
Date clientIdIssuedAt
 
Date clientSecretExpiresAt
 
List< ResponseTyperesponseTypes
 
List< GrantTypegrantTypes
 
Map< String, String > claims = new HashMap<String, String>()
 

静的非公開変数類

static final Logger LOG = Logger.getLogger(RegisterResponse.class)
 

詳解

Represents a register response received from the authorization server.

著者
Javier Rojas Blum
バージョン
July 18, 2017

構築子と解体子

◆ RegisterResponse() [1/2]

org.xdi.oxauth.client.RegisterResponse.RegisterResponse ( )
inline
48  {
49  }

◆ RegisterResponse() [2/2]

org.xdi.oxauth.client.RegisterResponse.RegisterResponse ( ClientResponse< String >  clientResponse)
inline

Constructs a register response.

54  {
55  super(clientResponse);
56 
57  String entity = clientResponse.getEntity(String.class);
58  setEntity(entity);
59  setHeaders(clientResponse.getMetadata());
60  injectDataFromJson(entity);
61  }
void injectDataFromJson()
Definition: RegisterResponse.java:68

関数詳解

◆ fromString()

RegisterErrorResponseType org.xdi.oxauth.client.RegisterResponse.fromString ( String  p_string)
inline
64  {
65  return RegisterErrorResponseType.fromString(p_string);
66  }

◆ getClaims()

Map<String, String> org.xdi.oxauth.client.RegisterResponse.getClaims ( )
inline
237  {
238  return claims;
239  }
Map< String, String > claims
Definition: RegisterResponse.java:46

◆ getClientId()

String org.xdi.oxauth.client.RegisterResponse.getClientId ( )
inline

Returns the client's identifier.

戻り値
The client's identifier.
142  {
143  return clientId;
144  }
String clientId
Definition: RegisterResponse.java:38

◆ getClientIdIssuedAt()

Date org.xdi.oxauth.client.RegisterResponse.getClientIdIssuedAt ( )
inline
189  {
190  // findbugs : return copy instead of original object
191  return clientIdIssuedAt != null ? new Date(clientIdIssuedAt.getTime()) : null;
192  }
Date clientIdIssuedAt
Definition: RegisterResponse.java:42

◆ getClientSecret()

String org.xdi.oxauth.client.RegisterResponse.getClientSecret ( )
inline

Returns the client's password.

戻り値
The client's password.
160  {
161  return clientSecret;
162  }
String clientSecret
Definition: RegisterResponse.java:39

◆ getClientSecretExpiresAt()

Date org.xdi.oxauth.client.RegisterResponse.getClientSecretExpiresAt ( )
inline

Return the expiration date after which the client's account will expire. null if the client's account never expires.

戻り値
The expiration date.
205  {
206  // findbugs : return copy instead of original object
207  return clientSecretExpiresAt != null ? new Date(clientSecretExpiresAt.getTime()) : null;
208  }
Date clientSecretExpiresAt
Definition: RegisterResponse.java:43

◆ getErrorDescription()

String org.xdi.oxauth.client.BaseResponseWithErrors< T extends IErrorType >.getErrorDescription ( )
inlineinherited
40  {
41  return errorDescription;
42  }
String errorDescription
Definition: BaseResponseWithErrors.java:25

◆ getErrorType()

T org.xdi.oxauth.client.BaseResponseWithErrors< T extends IErrorType >.getErrorType ( )
inlineinherited
48  {
49  return errorType;
50  }

◆ getErrorUri()

String org.xdi.oxauth.client.BaseResponseWithErrors< T extends IErrorType >.getErrorUri ( )
inlineinherited
56  {
57  return errorUri;
58  }
String errorUri
Definition: BaseResponseWithErrors.java:26

◆ getGrantTypes()

List<GrantType> org.xdi.oxauth.client.RegisterResponse.getGrantTypes ( )
inline
229  {
230  return grantTypes;
231  }
List< GrantType > grantTypes
Definition: RegisterResponse.java:45

◆ getRegistrationAccessToken()

String org.xdi.oxauth.client.RegisterResponse.getRegistrationAccessToken ( )
inline
173  {
175  }
String registrationAccessToken
Definition: RegisterResponse.java:40

◆ getRegistrationClientUri()

String org.xdi.oxauth.client.RegisterResponse.getRegistrationClientUri ( )
inline
181  {
182  return registrationClientUri;
183  }
String registrationClientUri
Definition: RegisterResponse.java:41

◆ getResponseTypes()

List<ResponseType> org.xdi.oxauth.client.RegisterResponse.getResponseTypes ( )
inline
221  {
222  return responseTypes;
223  }
List< ResponseType > responseTypes
Definition: RegisterResponse.java:44

◆ injectDataFromJson() [1/2]

void org.xdi.oxauth.client.RegisterResponse.injectDataFromJson ( )
inline
68  {
69  injectDataFromJson(getEntity());
70  }
void injectDataFromJson()
Definition: RegisterResponse.java:68

◆ injectDataFromJson() [2/2]

void org.xdi.oxauth.client.RegisterResponse.injectDataFromJson ( String  p_json)
inline
78  {
79  if (StringUtils.isNotBlank(p_json)) {
80  try {
81  JSONObject jsonObj = new JSONObject(p_json);
82  if (jsonObj.has(RegisterResponseParam.CLIENT_ID.toString())) {
83  setClientId(jsonObj.getString(RegisterResponseParam.CLIENT_ID.toString()));
84  jsonObj.remove(RegisterResponseParam.CLIENT_ID.toString());
85  }
86  if (jsonObj.has(CLIENT_SECRET.toString())) {
87  setClientSecret(jsonObj.getString(CLIENT_SECRET.toString()));
88  jsonObj.remove(CLIENT_SECRET.toString());
89  }
90  if (jsonObj.has(RegisterResponseParam.REGISTRATION_ACCESS_TOKEN.toString())) {
91  setRegistrationAccessToken(jsonObj.getString(RegisterResponseParam.REGISTRATION_ACCESS_TOKEN.toString()));
92  jsonObj.remove(RegisterResponseParam.REGISTRATION_ACCESS_TOKEN.toString());
93  }
94  if (jsonObj.has(REGISTRATION_CLIENT_URI.toString())) {
95  setRegistrationClientUri(jsonObj.getString(REGISTRATION_CLIENT_URI.toString()));
96  jsonObj.remove(REGISTRATION_CLIENT_URI.toString());
97  }
98  if (jsonObj.has(CLIENT_ID_ISSUED_AT.toString())) {
99  long clientIdIssuedAt = jsonObj.getLong(CLIENT_ID_ISSUED_AT.toString());
100  if (clientIdIssuedAt > 0) {
101  setClientIdIssuedAt(new Date(clientIdIssuedAt * 1000L));
102  }
103  jsonObj.remove(CLIENT_ID_ISSUED_AT.toString());
104  }
105  if (jsonObj.has(CLIENT_SECRET_EXPIRES_AT.toString())) {
106  long clientSecretExpiresAt = jsonObj.getLong(CLIENT_SECRET_EXPIRES_AT.toString());
107  if (clientSecretExpiresAt > 0) {
108  setClientSecretExpiresAt(new Date(clientSecretExpiresAt * 1000L));
109  }
110  jsonObj.remove(CLIENT_SECRET_EXPIRES_AT.toString());
111  }
112  if (jsonObj.has(RESPONSE_TYPES.toString())) {
113  JSONArray responseTypesJsonArray = jsonObj.getJSONArray(RESPONSE_TYPES.toString());
114  responseTypes = Util.asEnumList(responseTypesJsonArray, ResponseType.class);
115  }
116  if (jsonObj.has(GRANT_TYPES.toString())) {
117  JSONArray grantTypesJsonArray = jsonObj.getJSONArray(GRANT_TYPES.toString());
118  grantTypes = Util.asEnumList(grantTypesJsonArray, GrantType.class);
119  }
120 
121  for (Iterator<String> it = jsonObj.keys(); it.hasNext(); ) {
122  String key = it.next();
123  getClaims().put(key, jsonObj.getString(key));
124  }
125  } catch (JSONException e) {
126  LOG.error(e.getMessage(), e);
127  } catch (NoSuchMethodException e) {
128  LOG.error(e.getMessage(), e);
129  } catch (IllegalAccessException e) {
130  LOG.error(e.getMessage(), e);
131  } catch (InvocationTargetException e) {
132  LOG.error(e.getMessage(), e);
133  }
134  }
135  }
List< ResponseType > responseTypes
Definition: RegisterResponse.java:44
void setClientSecretExpiresAt(Date clientSecretExpiresAt)
Definition: RegisterResponse.java:216
Date clientSecretExpiresAt
Definition: RegisterResponse.java:43
static final Logger LOG
Definition: RegisterResponse.java:36
Map< String, String > getClaims()
Definition: RegisterResponse.java:237
void setRegistrationClientUri(String registrationClientUri)
Definition: RegisterResponse.java:185
void setClientId(String clientId)
Definition: RegisterResponse.java:151
void setClientSecret(String clientSecret)
Definition: RegisterResponse.java:169
Date clientIdIssuedAt
Definition: RegisterResponse.java:42
void setClientIdIssuedAt(Date clientIdIssuedAt)
Definition: RegisterResponse.java:194
List< GrantType > grantTypes
Definition: RegisterResponse.java:45
void setRegistrationAccessToken(String registrationAccessToken)
Definition: RegisterResponse.java:177

◆ injectErrorIfExistSilently() [1/2]

void org.xdi.oxauth.client.BaseResponseWithErrors< T extends IErrorType >.injectErrorIfExistSilently ( JSONObject  jsonObj) throws JSONException
inlineinherited
69  {
70  if (jsonObj.has("error")) {
71  errorType = fromString(jsonObj.getString("error"));
72  }
73  if (jsonObj.has("error_description")) {
74  errorDescription = jsonObj.getString("error_description");
75  }
76  if (jsonObj.has("error_uri")) {
77  errorUri = jsonObj.getString("error_uri");
78  }
79  }
String errorDescription
Definition: BaseResponseWithErrors.java:25
String errorUri
Definition: BaseResponseWithErrors.java:26

◆ injectErrorIfExistSilently() [2/2]

void org.xdi.oxauth.client.BaseResponseWithErrors< T extends IErrorType >.injectErrorIfExistSilently ( String  p_entity)
inlineinherited
81  {
82  try {
83  injectErrorIfExistSilently(new JSONObject(p_entity));
84  } catch (JSONException e) {
85  // ignore : it's ok to skip exception because entity string can be json array or just trash
86  }
87  }
void injectErrorIfExistSilently(JSONObject jsonObj)
Definition: BaseResponseWithErrors.java:69

◆ setClaims()

void org.xdi.oxauth.client.RegisterResponse.setClaims ( Map< String, String >  claims)
inline
241  {
242  this.claims = claims;
243  }
Map< String, String > claims
Definition: RegisterResponse.java:46

◆ setClientId()

void org.xdi.oxauth.client.RegisterResponse.setClientId ( String  clientId)
inline

Sets the client's identifier.

引数
clientIdThe client's identifier.
151  {
152  this.clientId = clientId;
153  }
String clientId
Definition: RegisterResponse.java:38

◆ setClientIdIssuedAt()

void org.xdi.oxauth.client.RegisterResponse.setClientIdIssuedAt ( Date  clientIdIssuedAt)
inline
194  {
195  // findbugs : save copy instead of original object
196  this.clientIdIssuedAt = clientIdIssuedAt != null ? new Date(clientIdIssuedAt.getTime()) : null;
197  }
Date clientIdIssuedAt
Definition: RegisterResponse.java:42

◆ setClientSecret()

void org.xdi.oxauth.client.RegisterResponse.setClientSecret ( String  clientSecret)
inline

Sets the client's password.

引数
clientSecretThe client's password.
169  {
170  this.clientSecret = clientSecret;
171  }
String clientSecret
Definition: RegisterResponse.java:39

◆ setClientSecretExpiresAt()

void org.xdi.oxauth.client.RegisterResponse.setClientSecretExpiresAt ( Date  clientSecretExpiresAt)
inline

Sets the expiration date after which the client's account will expire. null if the client's account never expires.

引数
clientSecretExpiresAtThe expiration date.
216  {
217  // findbugs : save copy instead of original object
218  this.clientSecretExpiresAt = clientSecretExpiresAt != null ? new Date(clientSecretExpiresAt.getTime()) : null;
219  }
Date clientSecretExpiresAt
Definition: RegisterResponse.java:43

◆ setErrorDescription()

void org.xdi.oxauth.client.BaseResponseWithErrors< T extends IErrorType >.setErrorDescription ( String  p_errorDescription)
inlineinherited
44  {
45  errorDescription = p_errorDescription;
46  }
String errorDescription
Definition: BaseResponseWithErrors.java:25

◆ setErrorType()

void org.xdi.oxauth.client.BaseResponseWithErrors< T extends IErrorType >.setErrorType ( p_errorType)
inlineinherited
52  {
53  errorType = p_errorType;
54  }

◆ setErrorUri()

void org.xdi.oxauth.client.BaseResponseWithErrors< T extends IErrorType >.setErrorUri ( String  p_errorUri)
inlineinherited
60  {
61  errorUri = p_errorUri;
62  }
String errorUri
Definition: BaseResponseWithErrors.java:26

◆ setGrantTypes()

void org.xdi.oxauth.client.RegisterResponse.setGrantTypes ( List< GrantType grantTypes)
inline
233  {
234  this.grantTypes = grantTypes;
235  }
List< GrantType > grantTypes
Definition: RegisterResponse.java:45

◆ setRegistrationAccessToken()

void org.xdi.oxauth.client.RegisterResponse.setRegistrationAccessToken ( String  registrationAccessToken)
inline
177  {
179  }
String registrationAccessToken
Definition: RegisterResponse.java:40

◆ setRegistrationClientUri()

void org.xdi.oxauth.client.RegisterResponse.setRegistrationClientUri ( String  registrationClientUri)
inline
185  {
187  }
String registrationClientUri
Definition: RegisterResponse.java:41

◆ setResponseTypes()

void org.xdi.oxauth.client.RegisterResponse.setResponseTypes ( List< ResponseType responseTypes)
inline
225  {
227  }
List< ResponseType > responseTypes
Definition: RegisterResponse.java:44

◆ valueOf()

static RegisterResponse org.xdi.oxauth.client.RegisterResponse.valueOf ( String  p_json)
inlinestatic
72  {
73  final RegisterResponse r = new RegisterResponse();
74  r.injectDataFromJson(p_json);
75  return r;
76  }
RegisterResponse()
Definition: RegisterResponse.java:48

メンバ詳解

◆ claims

Map<String, String> org.xdi.oxauth.client.RegisterResponse.claims = new HashMap<String, String>()
private

◆ clientId

String org.xdi.oxauth.client.RegisterResponse.clientId
private

◆ clientIdIssuedAt

Date org.xdi.oxauth.client.RegisterResponse.clientIdIssuedAt
private

◆ clientSecret

String org.xdi.oxauth.client.RegisterResponse.clientSecret
private

◆ clientSecretExpiresAt

Date org.xdi.oxauth.client.RegisterResponse.clientSecretExpiresAt
private

◆ grantTypes

List<GrantType> org.xdi.oxauth.client.RegisterResponse.grantTypes
private

◆ LOG

final Logger org.xdi.oxauth.client.RegisterResponse.LOG = Logger.getLogger(RegisterResponse.class)
staticprivate

◆ registrationAccessToken

String org.xdi.oxauth.client.RegisterResponse.registrationAccessToken
private

◆ registrationClientUri

String org.xdi.oxauth.client.RegisterResponse.registrationClientUri
private

◆ responseTypes

List<ResponseType> org.xdi.oxauth.client.RegisterResponse.responseTypes
private

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