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

公開メンバ関数

 JSONWebKey ()
 
String getKid ()
 
void setKid (String kid)
 
KeyType getKty ()
 
void setKty (KeyType kty)
 
Use getUse ()
 
void setUse (Use use)
 
SignatureAlgorithm getAlg ()
 
void setAlg (SignatureAlgorithm alg)
 
Long getExp ()
 
void setExp (Long exp)
 
ECEllipticCurve getCrv ()
 
void setCrv (ECEllipticCurve crv)
 
List< String > getX5c ()
 
void setX5c (List< String > x5c)
 
String getN ()
 
void setN (String n)
 
String getE ()
 
void setE (String e)
 
String getX ()
 
void setX (String x)
 
String getY ()
 
void setY (String y)
 
JSONObject toJSONObject () throws JSONException
 
int compareTo (JSONWebKey o)
 

静的公開メンバ関数

static JSONWebKey fromJSONObject (JSONObject jwkJSONObject) throws JSONException
 

非公開変数類

String kid
 
KeyType kty
 
Use use
 
SignatureAlgorithm alg
 
Long exp
 
ECEllipticCurve crv
 
List< String > x5c
 
String n
 
String e
 
String x
 
String y
 

詳解

著者
Javier Rojas Blum
バージョン
September 30, 2016

構築子と解体子

◆ JSONWebKey()

org.xdi.oxauth.model.jwk.JSONWebKey.JSONWebKey ( )
inline
47  {
48  }

関数詳解

◆ compareTo()

int org.xdi.oxauth.model.jwk.JSONWebKey.compareTo ( JSONWebKey  o)
inline
241  {
242  if (this.getExp() == null || o.getExp() == null) {
243  return 0;
244  }
245 
246  return getExp().compareTo(o.getExp());
247  }
Long getExp()
Definition: JSONWebKey.java:103

◆ fromJSONObject()

static JSONWebKey org.xdi.oxauth.model.jwk.JSONWebKey.fromJSONObject ( JSONObject  jwkJSONObject) throws JSONException
inlinestatic
249  {
250  JSONWebKey jwk = new JSONWebKey();
251 
252  jwk.setKid(jwkJSONObject.optString(KEY_ID));
253  jwk.setKty(KeyType.fromString(jwkJSONObject.optString(KEY_TYPE)));
254  jwk.setUse(Use.fromString(jwkJSONObject.optString(KEY_USE)));
255  jwk.setAlg(SignatureAlgorithm.fromString(jwkJSONObject.optString(ALGORITHM)));
256  if (jwkJSONObject.has(EXPIRATION_TIME)) {
257  jwk.setExp(jwkJSONObject.optLong(EXPIRATION_TIME));
258  }
259  jwk.setCrv(ECEllipticCurve.fromString(jwkJSONObject.optString(CURVE)));
260  if (jwkJSONObject.has(MODULUS)) {
261  jwk.setN(jwkJSONObject.optString(MODULUS));
262  }
263  if (jwkJSONObject.has(EXPONENT)) {
264  jwk.setE(jwkJSONObject.optString(EXPONENT));
265  }
266  if (jwkJSONObject.has(X)) {
267  jwk.setX(jwkJSONObject.optString(X));
268  }
269  if (jwkJSONObject.has(Y)) {
270  jwk.setY(jwkJSONObject.optString(Y));
271  }
272  if (jwkJSONObject.has(CERTIFICATE_CHAIN)) {
273  jwk.setX5c(StringUtils.toList(jwkJSONObject.optJSONArray(CERTIFICATE_CHAIN)));
274  }
275 
276  return jwk;
277  }
JSONWebKey()
Definition: JSONWebKey.java:47

◆ getAlg()

SignatureAlgorithm org.xdi.oxauth.model.jwk.JSONWebKey.getAlg ( )
inline
95  {
96  return alg;
97  }
SignatureAlgorithm alg
Definition: JSONWebKey.java:29

◆ getCrv()

ECEllipticCurve org.xdi.oxauth.model.jwk.JSONWebKey.getCrv ( )
inline

Returns the curve member that identifies the cryptographic curve used with the key.

戻り値
The curve member that identifies the cryptographic curve used with the key.
116  {
117  return crv;
118  }
ECEllipticCurve crv
Definition: JSONWebKey.java:31

◆ getE()

String org.xdi.oxauth.model.jwk.JSONWebKey.getE ( )
inline

Returns the exponent value for the RSA public key.

戻り値
The exponent value for the RSA public key.
161  {
162  return e;
163  }
String e
Definition: JSONWebKey.java:42

◆ getExp()

Long org.xdi.oxauth.model.jwk.JSONWebKey.getExp ( )
inline
103  {
104  return exp;
105  }
Long exp
Definition: JSONWebKey.java:30

◆ getKid()

String org.xdi.oxauth.model.jwk.JSONWebKey.getKid ( )
inline

Returns the Key ID. The Key ID member can be used to match a specific key. This can be used, for instance, to choose among a set of keys within the JWK during key rollover.

戻り値
The Key ID.
56  {
57  return kid;
58  }
String kid
Definition: JSONWebKey.java:26

◆ getKty()

KeyType org.xdi.oxauth.model.jwk.JSONWebKey.getKty ( )
inline
69  {
70  return kty;
71  }
KeyType kty
Definition: JSONWebKey.java:27

◆ getN()

String org.xdi.oxauth.model.jwk.JSONWebKey.getN ( )
inline

Returns the modulus value for the RSA public key. It is represented as the base64url encoding of the value's representation.

戻り値
The modulus value for the RSA public key.
143  {
144  return n;
145  }
String n
Definition: JSONWebKey.java:37

◆ getUse()

Use org.xdi.oxauth.model.jwk.JSONWebKey.getUse ( )
inline

Returns the intended use of the key: signature or encryption.

戻り値
The intended use of the key.
82  {
83  return use;
84  }
Use use
Definition: JSONWebKey.java:28

◆ getX()

String org.xdi.oxauth.model.jwk.JSONWebKey.getX ( )
inline

Returns the x member that contains the x coordinate for the elliptic curve point. It is represented as the base64url encoding of the coordinate's big endian representation.

戻り値
The x member that contains the x coordinate for the elliptic curve point.
180  {
181  return x;
182  }
String x
Definition: JSONWebKey.java:44

◆ getX5c()

List<String> org.xdi.oxauth.model.jwk.JSONWebKey.getX5c ( )
inline
129  {
130  return x5c;
131  }
List< String > x5c
Definition: JSONWebKey.java:32

◆ getY()

String org.xdi.oxauth.model.jwk.JSONWebKey.getY ( )
inline

Returns the y member that contains the x coordinate for the elliptic curve point. It is represented as the base64url encoding of the coordinate's big endian representation.

戻り値
The y member that contains the x coordinate for the elliptic curve point.
199  {
200  return y;
201  }
String y
Definition: JSONWebKey.java:45

◆ setAlg()

void org.xdi.oxauth.model.jwk.JSONWebKey.setAlg ( SignatureAlgorithm  alg)
inline
99  {
100  this.alg = alg;
101  }
SignatureAlgorithm alg
Definition: JSONWebKey.java:29

◆ setCrv()

void org.xdi.oxauth.model.jwk.JSONWebKey.setCrv ( ECEllipticCurve  crv)
inline

Sets the curve member that identifies the cryptographic curve used with the key.

引数
crvThe curve member that identifies the cryptographic curve used with the key.
125  {
126  this.crv = crv;
127  }
ECEllipticCurve crv
Definition: JSONWebKey.java:31

◆ setE()

void org.xdi.oxauth.model.jwk.JSONWebKey.setE ( String  e)
inline

Sets the exponent value for the RSA public key.

引数
eThe exponent value for the RSA public key.
170  {
171  this.e = e;
172  }
String e
Definition: JSONWebKey.java:42

◆ setExp()

void org.xdi.oxauth.model.jwk.JSONWebKey.setExp ( Long  exp)
inline
107  {
108  this.exp = exp;
109  }
Long exp
Definition: JSONWebKey.java:30

◆ setKid()

void org.xdi.oxauth.model.jwk.JSONWebKey.setKid ( String  kid)
inline

Sets the Key ID.

引数
kidThe Key ID.
65  {
66  this.kid = kid;
67  }
String kid
Definition: JSONWebKey.java:26

◆ setKty()

void org.xdi.oxauth.model.jwk.JSONWebKey.setKty ( KeyType  kty)
inline
73  {
74  this.kty = kty;
75  }
KeyType kty
Definition: JSONWebKey.java:27

◆ setN()

void org.xdi.oxauth.model.jwk.JSONWebKey.setN ( String  n)
inline

Sets the modulus value for the RSA public key.

引数
nThe modulus value for the RSA public key.
152  {
153  this.n = n;
154  }
String n
Definition: JSONWebKey.java:37

◆ setUse()

void org.xdi.oxauth.model.jwk.JSONWebKey.setUse ( Use  use)
inline

Sets the intended use of the key: signature or encryption.

引数
useThe intended use of the key.
91  {
92  this.use = use;
93  }
Use use
Definition: JSONWebKey.java:28

◆ setX()

void org.xdi.oxauth.model.jwk.JSONWebKey.setX ( String  x)
inline

Sets the x member that contains the x coordinate for the elliptic curve point.

引数
xThe x member that contains the x coordinate for the elliptic curve point.
189  {
190  this.x = x;
191  }
String x
Definition: JSONWebKey.java:44

◆ setX5c()

void org.xdi.oxauth.model.jwk.JSONWebKey.setX5c ( List< String >  x5c)
inline
133  {
134  this.x5c = x5c;
135  }
List< String > x5c
Definition: JSONWebKey.java:32

◆ setY()

void org.xdi.oxauth.model.jwk.JSONWebKey.setY ( String  y)
inline

Sets the y member that contains the y coordinate for the elliptic curve point.

引数
yThe y member that contains the y coordinate for the elliptic curve point.
208  {
209  this.y = y;
210  }
String y
Definition: JSONWebKey.java:45

◆ toJSONObject()

JSONObject org.xdi.oxauth.model.jwk.JSONWebKey.toJSONObject ( ) throws JSONException
inline
212  {
213  JSONObject jsonObj = new JSONObject();
214 
215  jsonObj.put(KEY_ID, kid);
216  jsonObj.put(KEY_TYPE, kty);
217  jsonObj.put(KEY_USE, use);
218  jsonObj.put(ALGORITHM, alg);
219  jsonObj.put(EXPIRATION_TIME, exp);
220  jsonObj.put(CURVE, crv);
221  if (!Util.isNullOrEmpty(n)) {
222  jsonObj.put(MODULUS, n);
223  }
224  if (!Util.isNullOrEmpty(e)) {
225  jsonObj.put(EXPONENT, e);
226  }
227  if (!Util.isNullOrEmpty(x)) {
228  jsonObj.put(X, x);
229  }
230  if (!Util.isNullOrEmpty(y)) {
231  jsonObj.put(Y, y);
232  }
233  if (x5c != null && !x5c.isEmpty()) {
234  jsonObj.put(CERTIFICATE_CHAIN, StringUtils.toJSONArray(x5c));
235  }
236 
237  return jsonObj;
238  }
List< String > x5c
Definition: JSONWebKey.java:32
String e
Definition: JSONWebKey.java:42
String y
Definition: JSONWebKey.java:45
String n
Definition: JSONWebKey.java:37
SignatureAlgorithm alg
Definition: JSONWebKey.java:29
KeyType kty
Definition: JSONWebKey.java:27
String x
Definition: JSONWebKey.java:44
String kid
Definition: JSONWebKey.java:26
ECEllipticCurve crv
Definition: JSONWebKey.java:31
Long exp
Definition: JSONWebKey.java:30
Use use
Definition: JSONWebKey.java:28

メンバ詳解

◆ alg

SignatureAlgorithm org.xdi.oxauth.model.jwk.JSONWebKey.alg
private

◆ crv

ECEllipticCurve org.xdi.oxauth.model.jwk.JSONWebKey.crv
private

◆ e

String org.xdi.oxauth.model.jwk.JSONWebKey.e
private

Exponent

◆ exp

Long org.xdi.oxauth.model.jwk.JSONWebKey.exp
private

◆ kid

String org.xdi.oxauth.model.jwk.JSONWebKey.kid
private

◆ kty

KeyType org.xdi.oxauth.model.jwk.JSONWebKey.kty
private

◆ n

String org.xdi.oxauth.model.jwk.JSONWebKey.n
private

Modulus

◆ use

Use org.xdi.oxauth.model.jwk.JSONWebKey.use
private

◆ x

String org.xdi.oxauth.model.jwk.JSONWebKey.x
private

◆ x5c

List<String> org.xdi.oxauth.model.jwk.JSONWebKey.x5c
private

◆ y

String org.xdi.oxauth.model.jwk.JSONWebKey.y
private

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