Class SimplePrincipal

  • All Implemented Interfaces:
    Serializable, Principal

    public class SimplePrincipal
    extends Object
    implements Principal
    A very simple principal. It does not imply any subject on its own. This is only provided as a convenience to get started. Developers are likely to build there own principal and decorate it with jpa annotations to store / retrieve it from a database where they are coupled to users.
    Author:
    marrink
    See Also:
    Serialized Form
    • Constructor Detail

      • SimplePrincipal

        public SimplePrincipal​(String name)
        Constructor.
        Parameters:
        name - the name of this principal
    • Method Detail

      • equals

        public boolean equals​(Object obj)
        Description copied from interface: Principal
        Compares this principal to the specified object. Returns true if the object passed in matches the principal represented by the implementation of this interface.
        Specified by:
        equals in interface Principal
        Overrides:
        equals in class Object
        Parameters:
        obj - principal to compare with.
        Returns:
        true if the principal passed in is the same as this principal, false otherwise.
        See Also:
        Object.equals(java.lang.Object)