Class DashboardController


  • @RestController
    @RequestMapping(path="api/dashboard",
                    produces="application/json")
    public class DashboardController
    extends java.lang.Object
    Rest API controller for the /dashboard endpoint.
    Since:
    6.0
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      java.util.List<org.apereo.cas.mgmt.domain.AuditLog> audit​(org.springframework.security.core.Authentication authentication, javax.servlet.http.HttpServletRequest request, java.util.Map<java.lang.String,​java.lang.String> query)
      Method calls the /auditLog endpoint in all registered CAS Servers with passef query parameters.
      org.apereo.cas.mgmt.domain.Cache cache​(org.springframework.security.core.Authentication authentication)
      Method calls the CAS Cluster pool for health info.
      void downloadAudit​(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response, org.springframework.security.core.Authentication authentication)
      Downloads audit log query result into plain file that is | delimited.
      java.util.Map<java.lang.String,​java.lang.Object> info​(org.springframework.security.core.Authentication authentication)
      Method calls the CAS server info endpoint to display deployed cas Server info.
      java.util.Map<java.lang.String,​java.util.Map<java.lang.String,​java.lang.Object>> loggers​(org.springframework.security.core.Authentication authentication)
      Method calls the CAS servers to query all set loggers and return a map to the client.
      java.util.Map<java.lang.String,​java.util.List<java.lang.String>> release​(org.springframework.security.core.Authentication authentication, java.util.Map<java.lang.String,​java.lang.String> data)
      Method calls the CAS Server releaseAttributes for the passed user and service and returns map of attributes.
      java.util.Map<java.lang.String,​java.util.List<java.lang.String>> resolve​(org.springframework.security.core.Authentication authentication, java.lang.String id)
      Method calls the CAS Server resolveAttribute for the passed user and returns a map of attributes.
      java.lang.String response​(org.springframework.security.core.Authentication authentication, java.util.Map<java.lang.String,​java.lang.String> data)
      Method calls the CAS Server samlResponse for the passed user and service and returns the produced SAML Response.
      void setLogger​(org.springframework.security.core.Authentication authentication, java.util.Map<java.lang.String,​java.lang.String> map)
      Method will update a logger on a CAS server to the passed log level.
      java.util.List<org.apereo.cas.mgmt.domain.Server> status​(org.springframework.security.core.Authentication authentication)
      Method returns a list of Server statuses for all configured cas servers in the cluster.
      org.apereo.cas.mgmt.domain.Server update​(org.springframework.security.core.Authentication authentication, int index)
      Returns the server status for the configured CAS server at the passed index.
      java.util.Map webflow​(org.springframework.security.core.Authentication authentication, java.lang.String flowId)
      Method calls the CAS servers to provide the spring webflow report.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • DashboardController

        public DashboardController()
    • Method Detail

      • status

        @GetMapping
        public java.util.List<org.apereo.cas.mgmt.domain.Server> status​(org.springframework.security.core.Authentication authentication)
                                                                 throws java.lang.IllegalAccessException
        Method returns a list of Server statuses for all configured cas servers in the cluster.
        Parameters:
        authentication - - the user
        Returns:
        - List of Server
        Throws:
        java.lang.IllegalAccessException - - insufficient permission
      • update

        @GetMapping("{index}")
        public org.apereo.cas.mgmt.domain.Server update​(org.springframework.security.core.Authentication authentication,
                                                        @PathVariable
                                                        int index)
                                                 throws java.lang.IllegalAccessException
        Returns the server status for the configured CAS server at the passed index.
        Parameters:
        authentication - - the user
        index - - index of CAS server
        Returns:
        - Server
        Throws:
        java.lang.IllegalAccessException - - insufficient permission
      • cache

        @GetMapping("/cache")
        public org.apereo.cas.mgmt.domain.Cache cache​(org.springframework.security.core.Authentication authentication)
                                               throws java.lang.IllegalAccessException
        Method calls the CAS Cluster pool for health info.
        Parameters:
        authentication - - the user
        Returns:
        - Server health
        Throws:
        java.lang.IllegalAccessException - - insufficient permissions
      • resolve

        @GetMapping("/resolve/{id}")
        public java.util.Map<java.lang.String,​java.util.List<java.lang.String>> resolve​(org.springframework.security.core.Authentication authentication,
                                                                                              @PathVariable
                                                                                              java.lang.String id)
                                                                                       throws java.lang.IllegalAccessException
        Method calls the CAS Server resolveAttribute for the passed user and returns a map of attributes.
        Parameters:
        authentication - - the response
        id - - the user id
        Returns:
        - the attributes
        Throws:
        java.lang.IllegalAccessException - - insufficient persmissions
      • release

        @PostMapping(value="/release",
                     consumes="application/json")
        public java.util.Map<java.lang.String,​java.util.List<java.lang.String>> release​(org.springframework.security.core.Authentication authentication,
                                                                                              @RequestBody
                                                                                              java.util.Map<java.lang.String,​java.lang.String> data)
                                                                                       throws java.lang.IllegalAccessException
        Method calls the CAS Server releaseAttributes for the passed user and service and returns map of attributes.
        Parameters:
        authentication - - the request
        data - - map
        Returns:
        - the attributes
        Throws:
        java.lang.IllegalAccessException - - insufficient permissions
      • response

        @PostMapping("/response")
        public java.lang.String response​(org.springframework.security.core.Authentication authentication,
                                         @RequestBody
                                         java.util.Map<java.lang.String,​java.lang.String> data)
                                  throws java.lang.IllegalAccessException
        Method calls the CAS Server samlResponse for the passed user and service and returns the produced SAML Response.
        Parameters:
        authentication - - the request
        data - - SAML Response
        Returns:
        - the attributes
        Throws:
        java.lang.IllegalAccessException - - insufficient permissions
      • info

        @GetMapping("/info")
        public java.util.Map<java.lang.String,​java.lang.Object> info​(org.springframework.security.core.Authentication authentication)
                                                                    throws java.lang.IllegalAccessException
        Method calls the CAS server info endpoint to display deployed cas Server info.
        Parameters:
        authentication - - the user
        Returns:
        - map of info details
        Throws:
        java.lang.IllegalAccessException - - insufficient permissions
      • webflow

        @GetMapping("/webflow")
        public java.util.Map webflow​(org.springframework.security.core.Authentication authentication,
                                     @RequestParam(name="flowId",required=false)
                                     java.lang.String flowId)
                              throws java.lang.IllegalAccessException
        Method calls the CAS servers to provide the spring webflow report.
        Parameters:
        authentication - - the request
        flowId - the flow id
        Returns:
        the map
        Throws:
        java.lang.IllegalAccessException - - insufficient permissions
      • loggers

        @GetMapping("/loggers")
        public java.util.Map<java.lang.String,​java.util.Map<java.lang.String,​java.lang.Object>> loggers​(org.springframework.security.core.Authentication authentication)
                                                                                                             throws java.lang.IllegalAccessException
        Method calls the CAS servers to query all set loggers and return a map to the client.
        Parameters:
        authentication - - the request
        Returns:
        - Map of Loggers for all configured servers
        Throws:
        java.lang.IllegalAccessException - - insufficient permissions
      • setLogger

        @PostMapping("/loggers")
        @ResponseStatus(OK)
        public void setLogger​(org.springframework.security.core.Authentication authentication,
                              @RequestBody
                              java.util.Map<java.lang.String,​java.lang.String> map)
                       throws java.lang.IllegalAccessException
        Method will update a logger on a CAS server to the passed log level.
        Parameters:
        authentication - - the request
        map - - server, logger, level
        Throws:
        java.lang.IllegalAccessException - - insufficient persmissions
      • audit

        @PostMapping("/audit")
        public java.util.List<org.apereo.cas.mgmt.domain.AuditLog> audit​(org.springframework.security.core.Authentication authentication,
                                                                         javax.servlet.http.HttpServletRequest request,
                                                                         @RequestBody
                                                                         java.util.Map<java.lang.String,​java.lang.String> query)
                                                                  throws java.lang.IllegalAccessException
        Method calls the /auditLog endpoint in all registered CAS Servers with passef query parameters. Responses from all servers are then sorted together by whenActionWasPerformed fields in the responses.
        Parameters:
        authentication - - the user
        request - - the request
        query - - query params
        Returns:
        - List of matching audit entries
        Throws:
        java.lang.IllegalAccessException - - insufficient permissions
      • downloadAudit

        @GetMapping("/audit/download")
        public void downloadAudit​(javax.servlet.http.HttpServletRequest request,
                                  javax.servlet.http.HttpServletResponse response,
                                  org.springframework.security.core.Authentication authentication)
        Downloads audit log query result into plain file that is | delimited.
        Parameters:
        request - - the request.
        response - - the response.
        authentication - - the user