Class JDBCIdentityValidator
- java.lang.Object
-
- io.apiman.gateway.engine.policies.auth.JDBCIdentityValidator
-
- All Implemented Interfaces:
IIdentityValidator<JDBCIdentitySource>
public class JDBCIdentityValidator extends Object implements IIdentityValidator<JDBCIdentitySource>
An identity validator that uses the static information in the config to validate the user.- Author:
- eric.wittmann@redhat.com
-
-
Constructor Summary
Constructors Constructor Description JDBCIdentityValidator()Constructor.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected voidcloseQuietly(IJdbcConnection connection)protected voidextractRoles(IJdbcConnection connection, String username, IPolicyContext context, JDBCIdentitySource config, IAsyncResultHandler<Boolean> handler)protected voidvalidate(IJdbcConnection connection, String query, String username, String password, IPolicyContext context, JDBCIdentitySource config, IAsyncResultHandler<Boolean> handler)voidvalidate(String username, String password, ApiRequest request, IPolicyContext context, JDBCIdentitySource config, IAsyncResultHandler<Boolean> handler)Asynchronously validates a user.
-
-
-
Method Detail
-
validate
public void validate(String username, String password, ApiRequest request, IPolicyContext context, JDBCIdentitySource config, IAsyncResultHandler<Boolean> handler)
Description copied from interface:IIdentityValidatorAsynchronously validates a user.- Specified by:
validatein interfaceIIdentityValidator<JDBCIdentitySource>- Parameters:
username- the usernamepassword- the passwordrequest- the API requestcontext- the policy contextconfig- the confighandler- the result handler- See Also:
IIdentityValidator.validate(String, String, ApiRequest, IPolicyContext, Object, IAsyncResultHandler)
-
validate
protected void validate(IJdbcConnection connection, String query, String username, String password, IPolicyContext context, JDBCIdentitySource config, IAsyncResultHandler<Boolean> handler)
- Parameters:
connection-query-username-context-password-config-handler-
-
extractRoles
protected void extractRoles(IJdbcConnection connection, String username, IPolicyContext context, JDBCIdentitySource config, IAsyncResultHandler<Boolean> handler)
- Parameters:
connection-username-context-config-handler-
-
closeQuietly
protected void closeQuietly(IJdbcConnection connection)
- Parameters:
connection-
-
-