Class DefaultAuthorizationMapping

  • All Implemented Interfaces:
    AuthorizationMapping

    public class DefaultAuthorizationMapping
    extends Object
    implements AuthorizationMapping
    The default implementation that defines the default authorization identity to be used, when none was selected by the client. This class simply removes the realm (if any) from the authentication identity (or 'principal') if and only if the realm matches the server's realm, the server's xmpp domain name, or any of the pre-approved realm names.
    Author:
    Jay Kline
    • Constructor Detail

      • DefaultAuthorizationMapping

        public DefaultAuthorizationMapping()
    • Method Detail

      • map

        public String map​(String authcid)
        Returns the default authorization identity (the identity to act as) for a provided authentication identity (or 'principal' - whose password is used).
        Specified by:
        map in interface AuthorizationMapping
        Parameters:
        authcid - authentication identity (or 'principal' whose password is used)
        Returns:
        The name of the default authorization identity to use.
      • name

        public String name()
        Returns the short name of the Policy
        Specified by:
        name in interface AuthorizationMapping
        Returns:
        The short name of the Policy