Class TokenSecurityRealm.Builder

    • Method Detail

      • principalClaimName

        public TokenSecurityRealm.Builder principalClaimName​(String name)
        The name of the claim that should be used to obtain the principal's name.
        Parameters:
        name - the name of the claim that should be used to obtain the principal's name. Defaults to username
        Returns:
        this instance
      • claimToPrincipal

        public TokenSecurityRealm.Builder claimToPrincipal​(Function<Attributes,​Principal> func)
        A function that maps the set of token claims to a Principal. If not specified, a function that takes the principalClaimName claim value and wraps in in a NamePrincipal is used.
        Parameters:
        func - - the claim set to Principal mapping function.
        Returns:
        the token Principal.