Class DefaultAuthVerifierImpl
java.lang.Object
com.amilesend.discogs.connection.auth.DefaultAuthVerifierImpl
- All Implemented Interfaces:
AuthVerifier
Helper to verify authentication defined for specific API calls to fail early if not configured for required calls.
Note: This class checks the call stack for classes annotated with the
Api annotation. Next, it
checks the method to see if it is annotated with either AuthenticationRequired or
AuthenticationOptional. If auth is required, then an AuthException is thrown; else, an info
log statement is recorded.- See Also:
-
Constructor Summary
ConstructorsConstructorDescriptionCreates a newDefaultAuthVerifierImplinstance with the default settings configured. -
Method Summary
Modifier and TypeMethodDescriptionvoidcheckIfAuthenticated(com.amilesend.client.connection.auth.AuthManager<?> authManager) Checks to see if the given invocation has proper authorization configured prior to invoking the API.
-
Constructor Details
-
DefaultAuthVerifierImpl
public DefaultAuthVerifierImpl()Creates a newDefaultAuthVerifierImplinstance with the default settings configured.
-
-
Method Details
-
checkIfAuthenticated
public void checkIfAuthenticated(com.amilesend.client.connection.auth.AuthManager<?> authManager) Description copied from interface:AuthVerifierChecks to see if the given invocation has proper authorization configured prior to invoking the API.- Specified by:
checkIfAuthenticatedin interfaceAuthVerifier- Parameters:
authManager- the configured authorization manager instance for the client connection
-