Revision 59638
Added by Katerina Iatropoulou over 3 years ago
ServiceRequest.java | ||
---|---|---|
13 | 13 |
String logoUri; |
14 | 14 |
String policyUri; |
15 | 15 |
String[] contacts; |
16 |
String[] scope = new String[]{"orcid", "openid", "email", "eduperson_entitlement", "profile", "offline_access"};
|
|
16 |
String[] scope = new String[]{"openid"};
|
|
17 | 17 |
String[] grantTypes = new String[] {"client_credentials"}; |
18 | 18 |
boolean allowIntrospection = true; |
19 | 19 |
String tokenEndpointAuthMethod = "PRIVATE KEY"; |
20 | 20 |
String tokenEndpointAuthSigningAlg = "RS256"; |
21 |
String jwksType = "VAL";
|
|
21 |
String jwksType; |
|
22 | 22 |
String jwksUri; |
23 |
Jwks jwks = new Jwks();
|
|
23 |
Jwks jwks; |
|
24 | 24 |
boolean allowRefresh = false; |
25 | 25 |
boolean reuseRefreshToken = true; |
26 | 26 |
boolean clearAccessTokensOnRefresh = true; |
... | ... | |
137 | 137 |
this.jwksUri = jwksUri; |
138 | 138 |
} |
139 | 139 |
|
140 |
public static void main(String[] args) { |
|
140 |
public Jwks getJwks() { |
|
141 |
return jwks; |
|
142 |
} |
|
141 | 143 |
|
142 |
GsonBuilder builder = new GsonBuilder(); |
|
143 |
builder.serializeNulls(); |
|
144 |
public void setJwks(Jwks jwks) { |
|
145 |
this.jwks = jwks; |
|
146 |
} |
|
147 |
} |
|
144 | 148 |
|
145 |
Gson gson = builder.create(); |
|
146 |
String json = gson.toJson(new ServiceRequest()); |
|
147 |
System.out.println(json); |
|
149 |
class Jwks implements Serializable { |
|
150 |
Key[] keys; |
|
148 | 151 |
|
152 |
public Key[] getKeys() { |
|
153 |
return keys; |
|
149 | 154 |
} |
150 |
} |
|
151 | 155 |
|
152 |
class Jwks implements Serializable { |
|
153 |
Key[] keys = new Key[]{new Key()}; |
|
156 |
public void setKeys(Key[] keys) { |
|
157 |
this.keys = keys; |
|
158 |
} |
|
154 | 159 |
} |
155 | 160 |
|
156 | 161 |
class Key implements Serializable { |
157 |
/* String kty;
|
|
162 |
String kty; |
|
158 | 163 |
String e; |
159 | 164 |
String kid; |
160 | 165 |
String alg; |
... | ... | |
199 | 204 |
public void setN(String n) { |
200 | 205 |
this.n = n; |
201 | 206 |
} |
202 |
*/ |
|
203 |
|
|
204 |
String kty = "RSA"; |
|
205 |
String e = "AQAB"; |
|
206 |
String kid = "05794a3c-a6f5-430c-9822-da4e53597ba5"; |
|
207 |
String alg = "RS256"; |
|
208 |
String n = "hm_OUny05OJEwbGBqPjE7wWvnwTMgqUHJFis_S9nM7hTivXQ_LX9f89RaVcPpXboox81Y8rrfuVwV0nc-FGr_" + |
|
209 |
"E0FFpI-IwJ_sUUEDwf-5Qxor3LNc_S_5BiPOfFHY7c-R-ablRIAvVTXqwIjcyLVQnaHLjb9XQPf9lBt9sCZ2jN-" + |
|
210 |
"9HOLztMO3BZWZYIFqvNr8ySKHfVPdlk0Wx3N45KPY0kgxk5RPYW0HLRakSlhIJtqYCJOr2IiDUEMAj9Z9BoWjeUKiAX3E3ZRo-" + |
|
211 |
"DO1TWcc7feq-0Pei2IBw3lvNpgcBBv1_BlrsZYzQqkKOcDbLAppuhR3inUNhc3G67OuWt8ow"; |
|
212 | 207 |
} |
213 | 208 |
|
214 | 209 |
|
210 |
|
|
211 |
|
|
212 |
|
Also available in: Unified diff
Register service almost ready