Class LocalPasswordImpl

  • All Implemented Interfaces:
    org.glassfish.hk2.api.PostConstruct, LocalPassword

    @Service
    @RunLevel(1)
    public class LocalPasswordImpl
    extends Object
    implements org.glassfish.hk2.api.PostConstruct, LocalPassword
    Manage a local password, which is a cryptographically secure random number stored in a file with permissions that only allow the owner to read it. A new local password is generated each time the server starts. The asadmin client can use it to authenticate when executing local commands, such as stop-domain, without the user needing to supply a password.
    Author:
    Bill Shannon
    • Constructor Detail

      • LocalPasswordImpl

        public LocalPasswordImpl()
    • Method Detail

      • postConstruct

        public void postConstruct()
        Generate a local password and save it in the local-password file.
        Specified by:
        postConstruct in interface org.glassfish.hk2.api.PostConstruct
      • isLocalPassword

        public boolean isLocalPassword​(String p)
        Is the given password the local password?
        Specified by:
        isLocalPassword in interface LocalPassword
        Parameters:
        p - the password to test
        Returns:
        true if it is a local password, false otherwise