Classes | |
enum | ManagementCapabilities |
Public Member Functions | |
boolean | authenticate (String user, UUID uuid) |
CompletableFuture< Boolean > | addAuthentication (String user, UUID uuid, boolean needsApproval) |
void | removeAuthentication (String user) |
boolean | doesPasscodeMatch (String passcode) |
ManagementCapabilities | managementCapabilities () |
List< String > | getAllNames () |
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.
enum com::thecoderscorner::menu::auth::MenuAuthenticator::ManagementCapabilities |
Indicates the management operations that can be performed by a particular implementation of authenticator
Enumerator | CAN_REMOVE |
Only removal is possible |
CAN_REMOVE_ADD |
Both removal and addition is allowed |
NOT_EDITABLE |
No editing or management is possible |
---|
CompletableFuture<Boolean> com.thecoderscorner.menu.auth.MenuAuthenticator.addAuthentication | ( | String | user, |
UUID | uuid, | ||
boolean | needsApproval | ||
) |
Attempt to add authentication for user and UUID, if it fails to be added false will be returned.
user | the user to add |
uuid | the uuid associated with the user |
needsApproval | true if this is being added from a remote connection and needs approval, otherwise false. |
Implemented in com.thecoderscorner.menu.auth.PropertiesAuthenticator, and com.thecoderscorner.menu.auth.PreDefinedAuthenticator.
boolean com.thecoderscorner.menu.auth.MenuAuthenticator.authenticate | ( | String | user, |
UUID | uuid | ||
) |
Check if the user and UUID pair can connect to this board.
user | the user to check for |
uuid | the UUID to check for |
Implemented in com.thecoderscorner.menu.auth.PropertiesAuthenticator, and com.thecoderscorner.menu.auth.PreDefinedAuthenticator.
boolean com.thecoderscorner.menu.auth.MenuAuthenticator.doesPasscodeMatch | ( | String | passcode | ) |
Checks if the provided passcode matches with the security passcode and returns false if it does not match.
passcode | the passcode to check |
Implemented in com.thecoderscorner.menu.auth.PropertiesAuthenticator, and com.thecoderscorner.menu.auth.PreDefinedAuthenticator.
List<String> com.thecoderscorner.menu.auth.MenuAuthenticator.getAllNames | ( | ) |
Gets a list of all apps/users stored in the system
Implemented in com.thecoderscorner.menu.auth.PropertiesAuthenticator, and com.thecoderscorner.menu.auth.PreDefinedAuthenticator.
ManagementCapabilities com.thecoderscorner.menu.auth.MenuAuthenticator.managementCapabilities | ( | ) |
Indicates how this authenticator can be edited, some don't support any, some remove only.
Implemented in com.thecoderscorner.menu.auth.PropertiesAuthenticator, and com.thecoderscorner.menu.auth.PreDefinedAuthenticator.
void com.thecoderscorner.menu.auth.MenuAuthenticator.removeAuthentication | ( | String | user | ) |
Remove the authentication for the given user
user | the user to remove |
Implemented in com.thecoderscorner.menu.auth.PropertiesAuthenticator, and com.thecoderscorner.menu.auth.PreDefinedAuthenticator.