public UmaTokenService createTokenService(UmaMetadata metadata) { return ProxyFactory.create(UmaTokenService.class, metadata.getTokenEndpoint()); }
public UmaRptIntrospectionService createRptStatusService(UmaMetadata metadata) { return ProxyFactory.create(UmaRptIntrospectionService.class, metadata.getIntrospectionEndpoint()); }
public UmaPermissionService createPermissionService(UmaMetadata metadata) { return ProxyFactory.create(UmaPermissionService.class, metadata.getPermissionEndpoint()); }
final UmaMetadata c = new UmaMetadata(); c.setIssuer(appConfiguration.getIssuer()); c.setGrantTypesSupported(new String[]{ GrantType.AUTHORIZATION_CODE.getValue(), GrantType.IMPLICIT.getValue(), GrantType.OXAUTH_UMA_TICKET.getValue() }); c.setResponseTypesSupported(new String[]{ ResponseType.CODE.getValue(), ResponseType.ID_TOKEN.getValue(), ResponseType.TOKEN.getValue() }); c.setTokenEndpointAuthMethodsSupported(appConfiguration.getTokenEndpointAuthMethodsSupported().toArray(new String[appConfiguration.getTokenEndpointAuthMethodsSupported().size()])); c.setTokenEndpointAuthSigningAlgValuesSupported(appConfiguration.getTokenEndpointAuthSigningAlgValuesSupported().toArray(new String[appConfiguration.getTokenEndpointAuthSigningAlgValuesSupported().size()])); c.setUiLocalesSupported(appConfiguration.getUiLocalesSupported().toArray(new String[appConfiguration.getUiLocalesSupported().size()])); c.setOpTosUri(appConfiguration.getOpTosUri()); c.setOpPolicyUri(appConfiguration.getOpPolicyUri()); c.setJwksUri(appConfiguration.getJwksUri()); c.setServiceDocumentation(appConfiguration.getServiceDocumentation()); c.setUmaProfilesSupported(new String[0]); c.setRegistrationEndpoint(appConfiguration.getRegistrationEndpoint()); c.setTokenEndpoint(appConfiguration.getTokenEndpoint()); c.setAuthorizationEndpoint(appConfiguration.getAuthorizationEndpoint()); c.setIntrospectionEndpoint(baseEndpointUri + "/rpt/status"); c.setResourceRegistrationEndpoint(baseEndpointUri + "/host/rsrc/resource_set"); c.setPermissionEndpoint(baseEndpointUri + "/host/rsrc_pr"); c.setScopeEndpoint(baseEndpointUri + UMA_SCOPES_SUFFIX); c.setClaimsInteractionEndpoint(baseEndpointUri + UMA_CLAIMS_GATHERING_PATH);
public UmaResourceService createResourceService(UmaMetadata metadata) { return ProxyFactory.create(UmaResourceService.class, metadata.getResourceRegistrationEndpoint()); }
@Test(dependsOnMethods = {"requestRptAndGetNeedsInfo"}) @Parameters({"umaPatClientId"}) public void claimsGathering(String umaPatClientId) throws Exception { String gatheringUrl = needInfo.buildClaimsGatheringUrl(umaPatClientId, this.metadata.getClaimsInteractionEndpoint()); System.out.println(gatheringUrl); System.out.println(); try { startSelenium(); driver.navigate().to(gatheringUrl); System.out.println(driver.getCurrentUrl()); driver.findElement(By.id("loginForm:country")).sendKeys("US"); driver.findElement(By.id("loginForm:gather")).click(); Thread.sleep(1000); System.out.println(driver.getCurrentUrl()); driver.findElement(By.id("loginForm:city")).sendKeys("NY"); driver.findElement(By.id("loginForm:gather")).click(); Thread.sleep(1200); // Finally after claims-redirect flow user gets redirect with new ticket // Sample: https://client.example.com/cb?ticket=e8e7bc0b-75de-4939-a9b1-2425dab3d5ec System.out.println(driver.getCurrentUrl()); claimsGatheringTicket = StringUtils.substringAfter(driver.getCurrentUrl(), "ticket="); } finally { stopSelenium(); } }
@Test @Parameters({"umaMetaDataUrl"}) public void scopePresence(final String umaMetaDataUrl) { final UmaMetadata metadata = UmaClientFactory.instance().createMetadataService(umaMetaDataUrl).getMetadata(); final UmaScopeService scopeService = UmaClientFactory.instance().createScopeService(metadata.getScopeEndpoint()); final UmaScopeDescription modifyScope = scopeService.getScope("modify"); UmaTestUtil.assert_(modifyScope); } }
public UmaResourceService createResourceService(UmaMetadata metadata, ClientExecutor clientExecutor) { return ProxyFactory.create(UmaResourceService.class, metadata.getResourceRegistrationEndpoint(), clientExecutor); }
public UmaTokenService createTokenService(UmaMetadata metadata, ClientExecutor clientExecutor) { return ProxyFactory.create(UmaTokenService.class, metadata.getTokenEndpoint(), clientExecutor); }
public UmaPermissionService createPermissionService(UmaMetadata metadata, ClientExecutor clientExecutor) { return ProxyFactory.create(UmaPermissionService.class, metadata.getPermissionEndpoint(), clientExecutor); }
public UmaRptIntrospectionService createRptStatusService(UmaMetadata metadata, ClientExecutor clientExecutor) { return ProxyFactory.create(UmaRptIntrospectionService.class, metadata.getIntrospectionEndpoint(), clientExecutor); }
tokenRequest.setAlgorithm(cryptoProvider.getSignatureAlgorithm(keyId)); tokenRequest.setKeyId(keyId); tokenRequest.setAudience(umaMetadata.getTokenEndpoint());