Package com.thecoderscorner.menu.auth
Interface MenuAuthenticator
- All Known Implementing Classes:
PreDefinedAuthenticator,PropertiesAuthenticator
public interface MenuAuthenticator
The authenticator interface that supports the checking of name and UUID pairs. It is used to validate users against
the provided name and UUID pair. Optionally, the interface can support adding additional authentication pairs.
-
Nested Class Summary
Nested ClassesModifier and TypeInterfaceDescriptionstatic enumIndicates the management operations that can be performed by a particular implementation of authenticator -
Method Summary
Modifier and TypeMethodDescriptionaddAuthentication(String user, UUID uuid, boolean needsApproval) Attempt to add authentication for user and UUID, if it fails to be added false will be returned.booleanauthenticate(String user, UUID uuid) Check if the user and UUID pair can connect to this board.booleandoesPasscodeMatch(String passcode) Checks if the provided passcode matches with the security passcode and returns false if it does not match.Gets a list of all apps/users stored in the systemIndicates how this authenticator can be edited, some don't support any, some remove only.voidremoveAuthentication(String user) Remove the authentication for the given user
-
Method Details
-
authenticate
Check if the user and UUID pair can connect to this board.- Parameters:
user- the user to check foruuid- the UUID to check for- Returns:
- true if the user and UUID are allowed, otherwise false
-
addAuthentication
Attempt to add authentication for user and UUID, if it fails to be added false will be returned.- Parameters:
user- the user to adduuid- the uuid associated with the userneedsApproval- true if this is being added from a remote connection and needs approval, otherwise false.- Returns:
- true if added, otherwise false.
-
removeAuthentication
Remove the authentication for the given user- Parameters:
user- the user to remove
-
doesPasscodeMatch
Checks if the provided passcode matches with the security passcode and returns false if it does not match.- Parameters:
passcode- the passcode to check- Returns:
- true if matching, otherwise false
-
managementCapabilities
MenuAuthenticator.ManagementCapabilities managementCapabilities()Indicates how this authenticator can be edited, some don't support any, some remove only.- Returns:
- how the authenticator can be managed
-
getAllNames
Gets a list of all apps/users stored in the system- Returns:
- the list of users
-