|  |  |  | 
|---|
|  |  |  | package org.keycloak.protocol.cas.installation; | 
|---|
|  |  |  |  | 
|---|
|  |  |  | import jakarta.ws.rs.core.MediaType; | 
|---|
|  |  |  | import jakarta.ws.rs.core.Response; | 
|---|
|  |  |  | import jakarta.ws.rs.core.UriBuilder; | 
|---|
|  |  |  | import org.keycloak.Config; | 
|---|
|  |  |  | import org.keycloak.models.ClientModel; | 
|---|
|  |  |  | import org.keycloak.models.KeycloakSession; | 
|---|
|  |  |  | 
|---|
|  |  |  | import org.keycloak.protocol.cas.CASLoginProtocol; | 
|---|
|  |  |  | import org.keycloak.services.resources.RealmsResource; | 
|---|
|  |  |  |  | 
|---|
|  |  |  | import javax.ws.rs.core.MediaType; | 
|---|
|  |  |  | import javax.ws.rs.core.Response; | 
|---|
|  |  |  | import javax.ws.rs.core.UriBuilder; | 
|---|
|  |  |  | import java.net.URI; | 
|---|
|  |  |  |  | 
|---|
|  |  |  | public class KeycloakCASClientInstallation implements ClientInstallationProvider { | 
|---|
|  |  |  | 
|---|
|  |  |  | String bindingUrl = RealmsResource.protocolUrl(bindingUrlBuilder) | 
|---|
|  |  |  | .build(realm.getName(), CASLoginProtocol.LOGIN_PROTOCOL).toString(); | 
|---|
|  |  |  | String description = "CAS Server URL: " + bindingUrl + "\n" + | 
|---|
|  |  |  | "CAS Protocol: CAS 2.0/3.0 (SAML 1.1 is not supported)\n" + | 
|---|
|  |  |  | "CAS Protocol: CAS 2.0/3.0, SAML 1.1\n" + | 
|---|
|  |  |  | "Use CAS REST API: false (unsupported)"; | 
|---|
|  |  |  | return Response.ok(description, MediaType.TEXT_PLAIN_TYPE).build(); | 
|---|
|  |  |  | } | 
|---|