當前位置: 首頁>>代碼示例>>Java>>正文


Java OpenIdConfigurationResponse類代碼示例

本文整理匯總了Java中org.xdi.oxauth.client.OpenIdConfigurationResponse的典型用法代碼示例。如果您正苦於以下問題:Java OpenIdConfigurationResponse類的具體用法?Java OpenIdConfigurationResponse怎麽用?Java OpenIdConfigurationResponse使用的例子?那麽, 這裏精選的類代碼示例或許可以為您提供幫助。


OpenIdConfigurationResponse類屬於org.xdi.oxauth.client包,在下文中一共展示了OpenIdConfigurationResponse類的5個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Java代碼示例。

示例1: loadOpenIdConfiguration

import org.xdi.oxauth.client.OpenIdConfigurationResponse; //導入依賴的package包/類
private void loadOpenIdConfiguration() {
	String openIdProvider = appConfiguration.getOpenIdProviderUrl();
	if (StringHelper.isEmpty(openIdProvider)) {
		throw new ConfigurationException("OpenIdProvider Url is invalid");
	}

	final OpenIdConfigurationClient openIdConfigurationClient = new OpenIdConfigurationClient(openIdProvider);
	final OpenIdConfigurationResponse response = openIdConfigurationClient.execOpenIdConfiguration();
	if ((response == null) || (response.getStatus() != 200)) {
		throw new ConfigurationException("Failed to load oxAuth configuration");
	}

	logger.info("Successfully loaded oxAuth configuration");

	this.openIdConfiguration = response;
}
 
開發者ID:AgarwalNeha1,項目名稱:gluu,代碼行數:17,代碼來源:OpenIdClient.java

示例2: loadOpenIdConfiguration

import org.xdi.oxauth.client.OpenIdConfigurationResponse; //導入依賴的package包/類
private void loadOpenIdConfiguration() {
	String openIdProvider = appConfiguration.getOxAuthIssuer();
	if (StringHelper.isEmpty(openIdProvider)) {
		throw new ConfigurationException("OpenIdProvider Url is invalid");
	}
	
	openIdProvider = openIdProvider + "/.well-known/openid-configuration";

	final OpenIdConfigurationClient openIdConfigurationClient = new OpenIdConfigurationClient(openIdProvider);
	final OpenIdConfigurationResponse response = openIdConfigurationClient.execOpenIdConfiguration();
	if ((response == null) || (response.getStatus() != 200)) {
		throw new ConfigurationException("Failed to load oxAuth configuration");
	}

	log.info("Successfully loaded oxAuth configuration");

	this.openIdConfiguration = response;
}
 
開發者ID:GluuFederation,項目名稱:oxTrust,代碼行數:19,代碼來源:OpenIdService.java

示例3: getOpenIdConfiguration

import org.xdi.oxauth.client.OpenIdConfigurationResponse; //導入依賴的package包/類
public OpenIdConfigurationResponse getOpenIdConfiguration() {
	return openIdConfiguration;
}
 
開發者ID:AgarwalNeha1,項目名稱:gluu,代碼行數:4,代碼來源:OpenIdClient.java

示例4: getOpenIdConfiguration

import org.xdi.oxauth.client.OpenIdConfigurationResponse; //導入依賴的package包/類
public OpenIdConfigurationResponse getOpenIdConfiguration() {
	// Call each time to allows retry
	init();

	return openIdConfiguration;
}
 
開發者ID:GluuFederation,項目名稱:oxTrust,代碼行數:7,代碼來源:OpenIdService.java

示例5: requestOpenIdConfiguration

import org.xdi.oxauth.client.OpenIdConfigurationResponse; //導入依賴的package包/類
@Test
@Parameters({"swdResource"})
public void requestOpenIdConfiguration(final String resource) throws Exception {
    showTitle("OpenID Connect Discovery");

    OpenIdConnectDiscoveryClient openIdConnectDiscoveryClient = new OpenIdConnectDiscoveryClient(resource);
    OpenIdConnectDiscoveryResponse openIdConnectDiscoveryResponse = openIdConnectDiscoveryClient.exec(
            new ApacheHttpClient4Executor(createHttpClient(HostnameVerifierType.ALLOW_ALL)));

    showClient(openIdConnectDiscoveryClient);
    assertEquals(openIdConnectDiscoveryResponse.getStatus(), 200, "Unexpected response code");
    assertNotNull(openIdConnectDiscoveryResponse.getSubject());
    assertTrue(openIdConnectDiscoveryResponse.getLinks().size() > 0);

    String configurationEndpoint = openIdConnectDiscoveryResponse.getLinks().get(0).getHref() +
            "/.well-known/openid-configuration";

    showTitle("OpenID Connect Configuration");

    OpenIdConfigurationClient client = new OpenIdConfigurationClient(configurationEndpoint);
    OpenIdConfigurationResponse response = client.execOpenIdConfiguration();

    showClient(client);
    assertEquals(response.getStatus(), 200, "Unexpected response code");
    assertNotNull(response.getIssuer(), "The issuer is null");
    assertNotNull(response.getAuthorizationEndpoint(), "The authorizationEndpoint is null");
    assertNotNull(response.getTokenEndpoint(), "The tokenEndpoint is null");
    assertNotNull(response.getUserInfoEndpoint(), "The userInfoEndPoint is null");
    assertNotNull(response.getClientInfoEndpoint(), "The clientInfoEndPoint is null");
    assertNotNull(response.getCheckSessionIFrame(), "The checkSessionIFrame is null");
    assertNotNull(response.getEndSessionEndpoint(), "The endSessionEndpoint is null");
    assertNotNull(response.getJwksUri(), "The jwksUri is null");
    assertNotNull(response.getRegistrationEndpoint(), "The registrationEndpoint is null");
    assertNotNull(response.getIntrospectionEndpoint(), "The introspectionEndpoint is null");
    assertNotNull(response.getIdGenerationEndpoint(), "The idGenerationEndpoint is null");

    assertTrue(response.getScopesSupported().size() > 0, "The scopesSupported is empty");
    assertTrue(response.getScopeToClaimsMapping().size() > 0, "The scope to claims mapping is empty");
    assertTrue(response.getResponseTypesSupported().size() > 0, "The responseTypesSupported is empty");
    assertTrue(response.getGrantTypesSupported().size() > 0, "The grantTypesSupported is empty");
    assertTrue(response.getAcrValuesSupported().size() >= 0, "The acrValuesSupported is empty");
    assertTrue(response.getSubjectTypesSupported().size() > 0, "The subjectTypesSupported is empty");
    assertTrue(response.getUserInfoSigningAlgValuesSupported().size() > 0, "The userInfoSigningAlgValuesSupported is empty");
    assertTrue(response.getUserInfoEncryptionAlgValuesSupported().size() > 0, "The userInfoEncryptionAlgValuesSupported is empty");
    assertTrue(response.getUserInfoEncryptionEncValuesSupported().size() > 0, "The userInfoEncryptionEncValuesSupported is empty");
    assertTrue(response.getIdTokenSigningAlgValuesSupported().size() > 0, "The idTokenSigningAlgValuesSupported is empty");
    assertTrue(response.getIdTokenEncryptionAlgValuesSupported().size() > 0, "The idTokenEncryptionAlgValuesSupported is empty");
    assertTrue(response.getIdTokenEncryptionEncValuesSupported().size() > 0, "The idTokenEncryptionEncValuesSupported is empty");
    assertTrue(response.getRequestObjectSigningAlgValuesSupported().size() > 0, "The requestObjectSigningAlgValuesSupported is empty");
    assertTrue(response.getRequestObjectEncryptionAlgValuesSupported().size() > 0, "The requestObjectEncryptionAlgValuesSupported is empty");
    assertTrue(response.getRequestObjectEncryptionEncValuesSupported().size() > 0, "The requestObjectEncryptionEncValuesSupported is empty");
    assertTrue(response.getTokenEndpointAuthMethodsSupported().size() > 0, "The tokenEndpointAuthMethodsSupported is empty");
    assertTrue(response.getTokenEndpointAuthSigningAlgValuesSupported().size() > 0, "The tokenEndpointAuthSigningAlgValuesSupported is empty");

    assertTrue(response.getDisplayValuesSupported().size() > 0, "The displayValuesSupported is empty");
    assertTrue(response.getClaimTypesSupported().size() > 0, "The claimTypesSupported is empty");
    assertTrue(response.getClaimsSupported().size() > 0, "The claimsSupported is empty");
    assertNotNull(response.getServiceDocumentation(), "The serviceDocumentation is null");
    assertTrue(response.getClaimsLocalesSupported().size() > 0, "The claimsLocalesSupported is empty");
    assertTrue(response.getUiLocalesSupported().size() > 0, "The uiLocalesSupported is empty");
    assertTrue(response.getClaimsParameterSupported(), "The claimsParameterSupported is false");
    assertTrue(response.getRequestParameterSupported(), "The requestParameterSupported is false");
    assertTrue(response.getRequestUriParameterSupported(), "The requestUriParameterSupported is false");
    assertFalse(response.getRequireRequestUriRegistration(), "The requireRequestUriRegistration is true");
    assertNotNull(response.getOpPolicyUri(), "The opPolicyUri is null");
    assertNotNull(response.getOpTosUri(), "The opTosUri is null");
}
 
開發者ID:GluuFederation,項目名稱:oxAuth,代碼行數:68,代碼來源:ConfigurationRestWebServiceHttpTest.java


注:本文中的org.xdi.oxauth.client.OpenIdConfigurationResponse類示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。