mitreid-connect
公開メンバ関数 | 関数 | 非公開変数類 | 全メンバ一覧
org.mitre.openid.connect.client.service.impl.DynamicServerConfigurationService.OpenIDConnectServiceConfigurationFetcher クラス
org.mitre.openid.connect.client.service.impl.DynamicServerConfigurationService.OpenIDConnectServiceConfigurationFetcher の継承関係図
Inheritance graph
org.mitre.openid.connect.client.service.impl.DynamicServerConfigurationService.OpenIDConnectServiceConfigurationFetcher 連携図
Collaboration graph

公開メンバ関数

ServerConfiguration load (String issuer) throws Exception
 

関数

 OpenIDConnectServiceConfigurationFetcher (HttpClient httpClient)
 

非公開変数類

HttpComponentsClientHttpRequestFactory httpFactory
 
JsonParser parser = new JsonParser()
 

詳解

著者
jricher

構築子と解体子

◆ OpenIDConnectServiceConfigurationFetcher()

org.mitre.openid.connect.client.service.impl.DynamicServerConfigurationService.OpenIDConnectServiceConfigurationFetcher.OpenIDConnectServiceConfigurationFetcher ( HttpClient  httpClient)
inlinepackage
137  {
138  this.httpFactory = new HttpComponentsClientHttpRequestFactory(httpClient);
139  }
HttpComponentsClientHttpRequestFactory httpFactory
Definition: DynamicServerConfigurationService.java:134

関数詳解

◆ load()

ServerConfiguration org.mitre.openid.connect.client.service.impl.DynamicServerConfigurationService.OpenIDConnectServiceConfigurationFetcher.load ( String  issuer) throws Exception
inline
142  {
143  RestTemplate restTemplate = new RestTemplate(httpFactory);
144 
145  // data holder
146  ServerConfiguration conf = new ServerConfiguration();
147 
148  // construct the well-known URI
149  String url = issuer + "/.well-known/openid-configuration";
150 
151  // fetch the value
152  String jsonString = restTemplate.getForObject(url, String.class);
153 
154  JsonElement parsed = parser.parse(jsonString);
155  if (parsed.isJsonObject()) {
156 
157  JsonObject o = parsed.getAsJsonObject();
158 
159  // sanity checks
160  if (!o.has("issuer")) {
161  throw new IllegalStateException("Returned object did not have an 'issuer' field");
162  }
163 
164  if (!issuer.equals(o.get("issuer").getAsString())) {
165  logger.info("Issuer used for discover was " + issuer + " but final issuer is " + o.get("issuer").getAsString());
166  }
167 
168  conf.setIssuer(o.get("issuer").getAsString());
169 
170 
171  conf.setAuthorizationEndpointUri(getAsString(o, "authorization_endpoint"));
172  conf.setTokenEndpointUri(getAsString(o, "token_endpoint"));
173  conf.setJwksUri(getAsString(o, "jwks_uri"));
174  conf.setUserInfoUri(getAsString(o, "userinfo_endpoint"));
175  conf.setRegistrationEndpointUri(getAsString(o, "registration_endpoint"));
176  conf.setIntrospectionEndpointUri(getAsString(o, "introspection_endpoint"));
177  conf.setAcrValuesSupported(getAsStringList(o, "acr_values_supported"));
178  conf.setCheckSessionIframe(getAsString(o, "check_session_iframe"));
179  conf.setClaimsLocalesSupported(getAsStringList(o, "claims_locales_supported"));
180  conf.setClaimsParameterSupported(getAsBoolean(o, "claims_parameter_supported"));
181  conf.setClaimsSupported(getAsStringList(o, "claims_supported"));
182  conf.setDisplayValuesSupported(getAsStringList(o, "display_values_supported"));
183  conf.setEndSessionEndpoint(getAsString(o, "end_session_endpoint"));
184  conf.setGrantTypesSupported(getAsStringList(o, "grant_types_supported"));
185  conf.setIdTokenSigningAlgValuesSupported(getAsJwsAlgorithmList(o, "id_token_signing_alg_values_supported"));
186  conf.setIdTokenEncryptionAlgValuesSupported(getAsJweAlgorithmList(o, "id_token_encryption_alg_values_supported"));
187  conf.setIdTokenEncryptionEncValuesSupported(getAsEncryptionMethodList(o, "id_token_encryption_enc_values_supported"));
188  conf.setOpPolicyUri(getAsString(o, "op_policy_uri"));
189  conf.setOpTosUri(getAsString(o, "op_tos_uri"));
190  conf.setRequestObjectEncryptionAlgValuesSupported(getAsJweAlgorithmList(o, "request_object_encryption_alg_values_supported"));
191  conf.setRequestObjectEncryptionEncValuesSupported(getAsEncryptionMethodList(o, "request_object_encryption_enc_values_supported"));
192  conf.setRequestObjectSigningAlgValuesSupported(getAsJwsAlgorithmList(o, "request_object_signing_alg_values_supported"));
193  conf.setRequestParameterSupported(getAsBoolean(o, "request_parameter_supported"));
194  conf.setRequestUriParameterSupported(getAsBoolean(o, "request_uri_parameter_supported"));
195  conf.setResponseTypesSupported(getAsStringList(o, "response_types_supported"));
196  conf.setScopesSupported(getAsStringList(o, "scopes_supported"));
197  conf.setSubjectTypesSupported(getAsStringList(o, "subject_types_supported"));
198  conf.setServiceDocumentation(getAsString(o, "service_documentation"));
199  conf.setTokenEndpointAuthMethodsSupported(getAsStringList(o, "token_endpoint_auth_methods"));
200  conf.setTokenEndpointAuthSigningAlgValuesSupported(getAsJwsAlgorithmList(o, "token_endpoint_auth_signing_alg_values_supported"));
201  conf.setUiLocalesSupported(getAsStringList(o, "ui_locales_supported"));
202  conf.setUserinfoEncryptionAlgValuesSupported(getAsJweAlgorithmList(o, "userinfo_encryption_alg_values_supported"));
203  conf.setUserinfoEncryptionEncValuesSupported(getAsEncryptionMethodList(o, "userinfo_encryption_enc_values_supported"));
204  conf.setUserinfoSigningAlgValuesSupported(getAsJwsAlgorithmList(o, "userinfo_signing_alg_values_supported"));
205 
206  return conf;
207  } else {
208  throw new IllegalStateException("Couldn't parse server discovery results for " + url);
209  }
210 
211  }
HttpComponentsClientHttpRequestFactory httpFactory
Definition: DynamicServerConfigurationService.java:134
static final Logger logger
Definition: DynamicServerConfigurationService.java:64

メンバ詳解

◆ httpFactory

HttpComponentsClientHttpRequestFactory org.mitre.openid.connect.client.service.impl.DynamicServerConfigurationService.OpenIDConnectServiceConfigurationFetcher.httpFactory
private

◆ parser

JsonParser org.mitre.openid.connect.client.service.impl.DynamicServerConfigurationService.OpenIDConnectServiceConfigurationFetcher.parser = new JsonParser()
private

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