Search in sources :

Example 1 with OAuth2ConfigResponse

use of io.jans.ca.plugin.adminui.model.auth.OAuth2ConfigResponse in project jans by JanssenProject.

the class OAuth2Resource method getOAuth2Config.

@GET
@Path(OAUTH2_CONFIG)
@Produces(MediaType.APPLICATION_JSON)
@ProtectedApi(scopes = { SCOPE_OPENID })
public Response getOAuth2Config() {
    AUIConfiguration auiConfiguration = auiConfigurationService.getAUIConfiguration();
    OAuth2ConfigResponse oauth2Config = new OAuth2ConfigResponse();
    oauth2Config.setAuthzBaseUrl(auiConfiguration.getAuthServerAuthzBaseUrl());
    oauth2Config.setClientId(auiConfiguration.getAuthServerClientId());
    oauth2Config.setResponseType("code");
    oauth2Config.setScope(auiConfiguration.getAuthServerScope());
    oauth2Config.setRedirectUrl(auiConfiguration.getAuthServerRedirectUrl());
    oauth2Config.setAcrValues("simple_password_auth");
    oauth2Config.setFrontChannelLogoutUrl(auiConfiguration.getAuthServerFrontChannelLogoutUrl());
    oauth2Config.setPostLogoutRedirectUri(auiConfiguration.getAuthServerPostLogoutRedirectUri());
    oauth2Config.setEndSessionEndpoint(auiConfiguration.getAuthServerEndSessionEndpoint());
    return Response.ok(oauth2Config).build();
}
Also used : OAuth2ConfigResponse(io.jans.ca.plugin.adminui.model.auth.OAuth2ConfigResponse) AUIConfiguration(io.jans.ca.plugin.adminui.model.config.AUIConfiguration) ProtectedApi(io.jans.configapi.core.rest.ProtectedApi)

Aggregations

OAuth2ConfigResponse (io.jans.ca.plugin.adminui.model.auth.OAuth2ConfigResponse)1 AUIConfiguration (io.jans.ca.plugin.adminui.model.config.AUIConfiguration)1 ProtectedApi (io.jans.configapi.core.rest.ProtectedApi)1