Package io.servicetalk.http.utils.auth
Interface BasicAuthHttpServiceFilter.CredentialsVerifier<UserInfo>
-
- Type Parameters:
UserInfo- a type for authenticated user info object
- All Superinterfaces:
AsyncCloseable,java.util.function.BiFunction<java.lang.String,java.lang.String,Single<UserInfo>>
- Enclosing class:
- BasicAuthHttpServiceFilter<UserInfo>
public static interface BasicAuthHttpServiceFilter.CredentialsVerifier<UserInfo> extends java.util.function.BiFunction<java.lang.String,java.lang.String,Single<UserInfo>>, AsyncCloseable
Verifiesuser-idandpassword, parsed from the 'Basic' HTTP Authentication Scheme credentials.This is an
AutoCloseableBiFunction, which acceptsuser-idandpasswordpair and returnsSingle<BasicAuthHttpServiceFilter.CredentialsVerifier> with a user info object of authenticated user. In case of denied accessSinglemust fail withAuthenticationException.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description Single<UserInfo>apply(java.lang.String userId, java.lang.String password)Verifiesuser-idandpassword, parsed from the 'Basic' HTTP Authentication Scheme credentials.-
Methods inherited from interface io.servicetalk.concurrent.api.AsyncCloseable
closeAsync, closeAsyncGracefully
-
-
-
-
Method Detail
-
apply
Single<UserInfo> apply(java.lang.String userId, java.lang.String password)
Verifiesuser-idandpassword, parsed from the 'Basic' HTTP Authentication Scheme credentials.- Specified by:
applyin interfacejava.util.function.BiFunction<java.lang.String,java.lang.String,Single<UserInfo>>- Parameters:
userId- auser-idparsed from the authentication tokenpassword- apasswordparsed from the authentication token- Returns:
Single<BasicAuthHttpServiceFilter.CredentialsVerifier> with a user info object of authenticated user orSinglefailed with anAuthenticationExceptionif access was denied
-
-