private void challengeEntitlementAuthentication(OIDCHttpFacade facade) { HttpFacade.Response response = facade.getResponse(); AuthzClient authzClient = getAuthzClient(); String clientId = authzClient.getConfiguration().getClientId(); String authorizationServerUri = authzClient.getServerConfiguration().getIssuer().toString() + "/authz/entitlement"; response.setStatus(401); response.setHeader( "WWW-Authenticate", "KC_ETT realm=\"" + clientId + "\",as_uri=\"" + authorizationServerUri + "\""); }
private void challengeUmaAuthentication( PathConfig pathConfig, Set<String> requiredScopes, OIDCHttpFacade facade) { HttpFacade.Response response = facade.getResponse(); AuthzClient authzClient = getAuthzClient(); String ticket = getPermissionTicket(pathConfig, requiredScopes, authzClient); String clientId = authzClient.getConfiguration().getClientId(); String authorizationServerUri = authzClient.getServerConfiguration().getIssuer().toString() + "/authz/authorize"; response.setStatus(401); response.setHeader( "WWW-Authenticate", "UMA realm=\"" + clientId + "\",as_uri=\"" + authorizationServerUri + "\",ticket=\"" + ticket + "\""); }