Interface ClientFactory

    • Method Detail

      • findClient

        Client findClient​(Principal principal,
                          VRObjectRepository db,
                          org.springframework.http.HttpHeaders headers,
                          Map<String,​Object> attributes)
        Find an authorised known client, called only if security principal is known.
        Parameters:
        principal - security principal of the client
        db - database repository
        headers - all HTTP headers
        attributes - session attributes copied from HttpSession
        Returns:
        a client found in the database or elsewhere
      • createGuestClient

        default Client createGuestClient​(org.springframework.http.HttpHeaders headers,
                                         Map<String,​Object> attributes)
        Create a new guest client, called only if server configuration allows for anonymous guest clients, and client name (security principal) is unknown. Default implementation does not create a client.
        Parameters:
        headers - all HTTP headers
        attributes - session attributes copied from HttpSession
        Returns:
        new Client instance, null by default
      • handleUnknownClient

        default Client handleUnknownClient​(org.springframework.http.HttpHeaders headers,
                                           Map<String,​Object> attributes)
        Called if guest clients are not allowed, and user name (security principal) is unknown. Implementation may yet return a client based on headers available. Default implementation returns null.
        Parameters:
        headers - all HTTP headers
        attributes - session attributes copied from HttpSession
        Returns:
        a Client determined by headers, null by default
      • clientAttribute

        default String clientAttribute()
        Identifies client attribute name, used as key to store client name in session attributes. Default is "local-user-name".
        Returns: