Interface AuthenticatedRequest.PrincipalExtractor

  • Enclosing class:
    AuthenticatedRequest

    public static interface AuthenticatedRequest.PrincipalExtractor
    Determines the current user principal and how to interpret that principal to extract user identity and allowed accounts.
    • Method Detail

      • principal

        default java.lang.Object principal()
        Returns:
        the user principal in the current security scope.
      • getSpinnakerAccounts

        default java.util.Optional<java.lang.String> getSpinnakerAccounts()
        Returns:
        The comma separated list of accounts for the current principal.
      • getSpinnakerAccounts

        default java.util.Optional<java.lang.String> getSpinnakerAccounts​(java.lang.Object principal)
        Parameters:
        principal - the principal to inspect for accounts
        Returns:
        the comma separated list of accounts for the provided principal.
      • getSpinnakerUser

        default java.util.Optional<java.lang.String> getSpinnakerUser()
        Returns:
        the user id of the current user
      • getSpinnakerUser

        default java.util.Optional<java.lang.String> getSpinnakerUser​(java.lang.Object principal)
        Parameters:
        principal - the principal from which to extract the userid
        Returns:
        the user id of the provided principal