Package net.solarnetwork.node.setup
Interface UserService
public interface UserService
API for managing users and roles on the SolarNode system.
- Since:
- 1.48
- Version:
- 1.1
- Author:
- matt
-
Method Summary
Modifier and TypeMethodDescriptionauthenticationInfo(String username) Get authentication info for a given username.voidchangePassword(String existingPassword, String newPassword, String newPasswordAgain) Update the active user's password.voidchangeUsername(String newUsername, String newUsernameAgain) Update the active user's username.booleanTest if any user exists.voidstoreUserProfile(UserProfile profile) Store a user profile into settings.
-
Method Details
-
someUserExists
boolean someUserExists()Test if any user exists.- Returns:
- true if some user exists
-
changePassword
Update the active user's password.- Parameters:
existingPassword- The existing password.newPassword- The new password to set.newPasswordAgain- The new password, repeated.- Throws:
IllegalArgumentException- if thenewPasswordandnewPasswordAgainvalues do not match, or are null
-
changeUsername
Update the active user's username.- Parameters:
newUsername- The new username to set.newUsernameAgain- The new username, repeated.- Throws:
IllegalArgumentException- if thenewUsernameandnewUsernameAgainvalues do not match, or are null
-
storeUserProfile
Store a user profile into settings.- Parameters:
profile- The profile to store.- Throws:
IllegalArgumentException- ifusernameis null, or if thepasswordandpasswordAgainvalues do not match or are null
-
authenticationInfo
Get authentication info for a given username.- Parameters:
username- the username to get authentication info for- Returns:
- the info, or null if not available
- Since:
- 1.1
-