Package com.sun.enterprise.v3.admin
Class LocalPasswordImpl
- java.lang.Object
-
- com.sun.enterprise.v3.admin.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 Summary
Constructors Constructor Description LocalPasswordImpl()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description StringgetLocalPassword()Get the local password.booleanisLocalPassword(String p)Is the given password the local password?voidpostConstruct()Generate a local password and save it in the local-password file.
-
-
-
Method Detail
-
postConstruct
public void postConstruct()
Generate a local password and save it in the local-password file.- Specified by:
postConstructin interfaceorg.glassfish.hk2.api.PostConstruct
-
isLocalPassword
public boolean isLocalPassword(String p)
Is the given password the local password?- Specified by:
isLocalPasswordin interfaceLocalPassword- Parameters:
p- the password to test- Returns:
- true if it is a local password, false otherwise
-
getLocalPassword
public String getLocalPassword()
Get the local password.- Specified by:
getLocalPasswordin interfaceLocalPassword- Returns:
- the local password
-
-