Class UsernameClaimMapping

    • Constructor Detail

      • UsernameClaimMapping

        public UsernameClaimMapping()
        No args constructor for use in serialization
    • Method Detail

      • getClaim

        public String getClaim()
        claim is a JWT token claim to be used in the mapping
      • setClaim

        public void setClaim​(String claim)
        claim is a JWT token claim to be used in the mapping
      • getPrefixPolicy

        public String getPrefixPolicy()
        prefixPolicy specifies how a prefix should apply.


        By default, claims other than `email` will be prefixed with the issuer URL to prevent naming clashes with other plugins.


        Set to "NoPrefix" to disable prefixing.


        Example:

        (1) `prefix` is set to "myoidc:" and `claim` is set to "username".

        If the JWT claim `username` contains value `userA`, the resulting

        mapped value will be "myoidc:userA".

        (2) `prefix` is set to "myoidc:" and `claim` is set to "email". If the

        JWT `email` claim contains value "userA@myoidc.tld", the resulting

        mapped value will be "myoidc:userA@myoidc.tld".

        (3) `prefix` is unset, `issuerURL` is set to `https://myoidc.tld`,

        the JWT claims include "username":"userA" and "email":"userA@myoidc.tld",

        and `claim` is set to:

        (a) "username": the mapped value will be "https://myoidc.tld#userA"

        (b) "email": the mapped value will be "userA@myoidc.tld"

      • setPrefixPolicy

        public void setPrefixPolicy​(String prefixPolicy)
        prefixPolicy specifies how a prefix should apply.


        By default, claims other than `email` will be prefixed with the issuer URL to prevent naming clashes with other plugins.


        Set to "NoPrefix" to disable prefixing.


        Example:

        (1) `prefix` is set to "myoidc:" and `claim` is set to "username".

        If the JWT claim `username` contains value `userA`, the resulting

        mapped value will be "myoidc:userA".

        (2) `prefix` is set to "myoidc:" and `claim` is set to "email". If the

        JWT `email` claim contains value "userA@myoidc.tld", the resulting

        mapped value will be "myoidc:userA@myoidc.tld".

        (3) `prefix` is unset, `issuerURL` is set to `https://myoidc.tld`,

        the JWT claims include "username":"userA" and "email":"userA@myoidc.tld",

        and `claim` is set to:

        (a) "username": the mapped value will be "https://myoidc.tld#userA"

        (b) "email": the mapped value will be "userA@myoidc.tld"

      • getAdditionalProperties

        public Map<String,​Object> getAdditionalProperties()
      • setAdditionalProperty

        public void setAdditionalProperty​(String name,
                                          Object value)
      • setAdditionalProperties

        public void setAdditionalProperties​(Map<String,​Object> additionalProperties)