tcMenuJavaAPI
Classes | Public Member Functions | List of all members
com.thecoderscorner.menu.auth.MenuAuthenticator Interface Reference
Inheritance diagram for com.thecoderscorner.menu.auth.MenuAuthenticator:
com.thecoderscorner.menu.auth.PreDefinedAuthenticator com.thecoderscorner.menu.auth.PropertiesAuthenticator

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 ()
 

Detailed Description

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.


Class Documentation

◆ com::thecoderscorner::menu::auth::MenuAuthenticator::ManagementCapabilities

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

Member Function Documentation

◆ addAuthentication()

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.

Parameters
userthe user to add
uuidthe uuid associated with the user
needsApprovaltrue if this is being added from a remote connection and needs approval, otherwise false.
Returns
true if added, otherwise false.

Implemented in com.thecoderscorner.menu.auth.PropertiesAuthenticator, and com.thecoderscorner.menu.auth.PreDefinedAuthenticator.

◆ authenticate()

boolean com.thecoderscorner.menu.auth.MenuAuthenticator.authenticate ( String  user,
UUID  uuid 
)

Check if the user and UUID pair can connect to this board.

Parameters
userthe user to check for
uuidthe UUID to check for
Returns
true if the user and UUID are allowed, otherwise false

Implemented in com.thecoderscorner.menu.auth.PropertiesAuthenticator, and com.thecoderscorner.menu.auth.PreDefinedAuthenticator.

◆ doesPasscodeMatch()

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.

Parameters
passcodethe passcode to check
Returns
true if matching, otherwise false

Implemented in com.thecoderscorner.menu.auth.PropertiesAuthenticator, and com.thecoderscorner.menu.auth.PreDefinedAuthenticator.

◆ getAllNames()

List<String> com.thecoderscorner.menu.auth.MenuAuthenticator.getAllNames ( )

Gets a list of all apps/users stored in the system

Returns
the list of users

Implemented in com.thecoderscorner.menu.auth.PropertiesAuthenticator, and com.thecoderscorner.menu.auth.PreDefinedAuthenticator.

◆ managementCapabilities()

ManagementCapabilities com.thecoderscorner.menu.auth.MenuAuthenticator.managementCapabilities ( )

Indicates how this authenticator can be edited, some don't support any, some remove only.

Returns
how the authenticator can be managed

Implemented in com.thecoderscorner.menu.auth.PropertiesAuthenticator, and com.thecoderscorner.menu.auth.PreDefinedAuthenticator.

◆ removeAuthentication()

void com.thecoderscorner.menu.auth.MenuAuthenticator.removeAuthentication ( String  user)

Remove the authentication for the given user

Parameters
userthe user to remove

Implemented in com.thecoderscorner.menu.auth.PropertiesAuthenticator, and com.thecoderscorner.menu.auth.PreDefinedAuthenticator.


The documentation for this interface was generated from the following file: