Search code examples
cas

CAS - how print the value present in json service in the webview login page?


I can read a value present in json service from thymeleaf and print it in the login webview ?

this is my json service:

{
  "@class" : "org.apereo.cas.services.RegexRegisteredService",
  "serviceId" : "http://furetto:8080/furetto-login",
  "name" : "furetto",
  "theme" : "furetto",
  "id" : 1000001,
  "description" : "I want print this description in the webview login",
  "attributeReleasePolicy": {
    "@class" : "org.apereo.cas.services.ReturnAllAttributeReleasePolicy",
    "principalAttributesRepository" : {
      "@class" :
      "org.apereo.cas.authentication.principal.DefaultPrincipalAttributesRepository",
      "attributeRepositoryIds": ["java.util.HashSet", [ "*" ]]
    }
  }
}

in my login page http://cas.com:9090/apereoCAS/login?service=http://furetto:8080/furetto-login i want print the value of key "description" present in json service. It's possible? thanks everybody

nothing, i don't know any solution.


Solution

  • Example:

    <div>
        <img th:if="${registeredService.logo}" th:src="${registeredService.logo}"/>
        <div>
            <h5><i class="mdi mdi-web"></i>[[${registeredService.name}]]</h5>
            <p th:text="${registeredService.description}">Registered Service Description</p>
        </div>
    </div>