Class ResourceAuthenticator

  • All Implemented Interfaces:
    IAuthenticator
    Direct Known Subclasses:
    FileAuthenticator

    public class ResourceAuthenticator
    extends Object
    implements IAuthenticator
    Load user credentials from a text resource. Each line of the file is formatted as "[username]:[sha256(password)]". The username mustn't contains : char. To encode your password from command line on Linux systems, you could use:
         echo -n "yourpassword" | sha256sum
     
    NB -n is important because echo append a newline by default at the of string. -n avoid this behaviour.
    • Field Detail

      • LOG

        protected static final org.slf4j.Logger LOG
    • Constructor Detail

      • ResourceAuthenticator

        public ResourceAuthenticator​(IResourceLoader resourceLoader,
                                     String resourceName)