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-id
andpassword
, parsed from the 'Basic' HTTP Authentication Scheme credentials.This is an
AutoCloseable
BiFunction
, which acceptsuser-id
andpassword
pair and returnsSingle
<BasicAuthHttpServiceFilter.CredentialsVerifier
> with a user info object of authenticated user. In case of denied accessSingle
must 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-id
andpassword
, 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-id
andpassword
, parsed from the 'Basic' HTTP Authentication Scheme credentials.- Specified by:
apply
in interfacejava.util.function.BiFunction<java.lang.String,java.lang.String,Single<UserInfo>>
- Parameters:
userId
- auser-id
parsed from the authentication tokenpassword
- apassword
parsed from the authentication token- Returns:
Single
<BasicAuthHttpServiceFilter.CredentialsVerifier
> with a user info object of authenticated user orSingle
failed with anAuthenticationException
if access was denied
-
-