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

公開メンバ関数

 JwkResponse (int status)
 
JSONWebKeySet getJwks ()
 
void setJwks (JSONWebKeySet jwks)
 
JSONWebKey getKeyValue (String keyId)
 
PublicKey getPublicKey (String keyId)
 
List< JSONWebKeygetKeys (SignatureAlgorithm algorithm)
 
String getKeyId (SignatureAlgorithm signatureAlgorithm)
 
int getStatus ()
 
String getLocation ()
 
void setLocation (String location)
 
void setStatus (int status)
 
String getEntity ()
 
void setEntity (String entity)
 
MultivaluedMap< String, Object > getHeaders ()
 
void setHeaders (MultivaluedMap< String, Object > headers)
 

限定公開変数類

int status
 
String location
 
String entity
 
MultivaluedMap< String, Object > headers
 

非公開変数類

JSONWebKeySet jwks
 

詳解

Represents a JSON Web Key (JWK) received from the authorization server.

著者
Javier Rojas Blum
バージョン
June 25, 2016

構築子と解体子

◆ JwkResponse()

org.xdi.oxauth.client.JwkResponse.JwkResponse ( int  status)
inline

Constructs a JWK response.

引数
statusThe response status code.
36  {
37  super(status);
38  }
int status
Definition: BaseResponse.java:19

関数詳解

◆ getEntity()

String org.xdi.oxauth.client.BaseResponse.getEntity ( )
inlineinherited

Returns the entity or body content of the response.

戻り値
The entity or body content of the response.
85  {
86  return entity;
87  }
String entity
Definition: BaseResponse.java:21

◆ getHeaders()

MultivaluedMap<String, Object> org.xdi.oxauth.client.BaseResponse.getHeaders ( )
inlineinherited
98  {
99  return headers;
100  }
MultivaluedMap< String, Object > headers
Definition: BaseResponse.java:22

◆ getJwks()

JSONWebKeySet org.xdi.oxauth.client.JwkResponse.getJwks ( )
inline
40  {
41  return jwks;
42  }
JSONWebKeySet jwks
Definition: JwkResponse.java:29

◆ getKeyId()

String org.xdi.oxauth.client.JwkResponse.getKeyId ( SignatureAlgorithm  signatureAlgorithm)
inline
112  {
113  List<JSONWebKey> jsonWebKeys = getKeys(signatureAlgorithm);
114  if (jsonWebKeys.size() > 0) {
115  return jsonWebKeys.get(0).getKid();
116  } else {
117  return null;
118  }
119  }
List< JSONWebKey > getKeys(SignatureAlgorithm algorithm)
Definition: JwkResponse.java:91

◆ getKeys()

List<JSONWebKey> org.xdi.oxauth.client.JwkResponse.getKeys ( SignatureAlgorithm  algorithm)
inline
91  {
92  List<JSONWebKey> jsonWebKeys = new ArrayList<JSONWebKey>();
93 
94  if (SignatureAlgorithmFamily.RSA.equals(algorithm.getFamily())) {
95  for (JSONWebKey jsonWebKey : jwks.getKeys()) {
96  if (jsonWebKey.getAlg().equals(algorithm)) {
97  jsonWebKeys.add(jsonWebKey);
98  }
99  }
100  } else if (SignatureAlgorithmFamily.EC.equals(algorithm.getFamily())) {
101  for (JSONWebKey jsonWebKey : jwks.getKeys()) {
102  if (jsonWebKey.getAlg().equals(algorithm)) {
103  jsonWebKeys.add(jsonWebKey);
104  }
105  }
106  }
107 
108  Collections.sort(jsonWebKeys);
109  return jsonWebKeys;
110  }
JSONWebKeySet jwks
Definition: JwkResponse.java:29
List< JSONWebKey > getKeys()
Definition: JSONWebKeySet.java:36

◆ getKeyValue()

JSONWebKey org.xdi.oxauth.client.JwkResponse.getKeyValue ( String  keyId)
inline

Search and returns a org.xdi.oxauth.model.jwk.JSONWebKey given its keyId.

引数
keyIdThe key id.
戻り値
The JSONWebKey if found, otherwise null.
55  {
56  for (JSONWebKey JSONWebKey : jwks.getKeys()) {
57  if (JSONWebKey.getKid().equals(keyId)) {
58  return JSONWebKey;
59  }
60  }
61 
62  return null;
63  }
JSONWebKeySet jwks
Definition: JwkResponse.java:29
List< JSONWebKey > getKeys()
Definition: JSONWebKeySet.java:36

◆ getLocation()

String org.xdi.oxauth.client.BaseResponse.getLocation ( )
inlineinherited

Returns the location of the response in the header.

戻り値
The location of the response.
58  {
59  return location;
60  }
String location
Definition: BaseResponse.java:20

◆ getPublicKey()

PublicKey org.xdi.oxauth.client.JwkResponse.getPublicKey ( String  keyId)
inline
66  {
67  PublicKey publicKey = null;
68  JSONWebKey JSONWebKey = getKeyValue(keyId);
69 
70  if (JSONWebKey != null) {
71  switch (JSONWebKey.getKty()) {
72  case RSA:
73  publicKey = new RSAPublicKey(
74  JSONWebKey.getN(),
75  JSONWebKey.getE());
76  break;
77  case EC:
78  publicKey = new ECDSAPublicKey(
79  JSONWebKey.getAlg(),
80  JSONWebKey.getX(),
81  JSONWebKey.getY());
82  break;
83  default:
84  break;
85  }
86  }
87 
88  return publicKey;
89  }
JSONWebKey getKeyValue(String keyId)
Definition: JwkResponse.java:55

◆ getStatus()

int org.xdi.oxauth.client.BaseResponse.getStatus ( )
inlineinherited

Returns the HTTP status code of the response.

戻り値
The HTTP status code.
49  {
50  return status;
51  }
int status
Definition: BaseResponse.java:19

◆ setEntity()

void org.xdi.oxauth.client.BaseResponse.setEntity ( String  entity)
inlineinherited

Sets the entity or body content of the response.

引数
entityThe entity or body content of the response.
94  {
95  this.entity = entity;
96  }
String entity
Definition: BaseResponse.java:21

◆ setHeaders()

void org.xdi.oxauth.client.BaseResponse.setHeaders ( MultivaluedMap< String, Object >  headers)
inlineinherited
102  {
103  this.headers = headers;
104  }
MultivaluedMap< String, Object > headers
Definition: BaseResponse.java:22

◆ setJwks()

void org.xdi.oxauth.client.JwkResponse.setJwks ( JSONWebKeySet  jwks)
inline
44  {
45  this.jwks = jwks;
46  }
JSONWebKeySet jwks
Definition: JwkResponse.java:29

◆ setLocation()

void org.xdi.oxauth.client.BaseResponse.setLocation ( String  location)
inlineinherited

Sets the location of the response in the header.

引数
locationThe location of the response.
67  {
68  this.location = location;
69  }
String location
Definition: BaseResponse.java:20

◆ setStatus()

void org.xdi.oxauth.client.BaseResponse.setStatus ( int  status)
inlineinherited

Sets the HTTP status code of the response.

引数
statusThe HTTP status code.
76  {
77  this.status = status;
78  }
int status
Definition: BaseResponse.java:19

メンバ詳解

◆ entity

String org.xdi.oxauth.client.BaseResponse.entity
protectedinherited

◆ headers

MultivaluedMap<String, Object> org.xdi.oxauth.client.BaseResponse.headers
protectedinherited

◆ jwks

JSONWebKeySet org.xdi.oxauth.client.JwkResponse.jwks
private

◆ location

String org.xdi.oxauth.client.BaseResponse.location
protectedinherited

◆ status

int org.xdi.oxauth.client.BaseResponse.status
protectedinherited

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