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
    Verifies user-id and password, parsed from the 'Basic' HTTP Authentication Scheme credentials.

    This is an AutoCloseable BiFunction, which accepts user-id and password pair and returns Single<BasicAuthHttpServiceFilter.CredentialsVerifier> with a user info object of authenticated user. In case of denied access Single must fail with AuthenticationException.

    • Method Detail

      • apply

        Single<UserInfo> apply​(java.lang.String userId,
                               java.lang.String password)
        Verifies user-id and password, parsed from the 'Basic' HTTP Authentication Scheme credentials.
        Specified by:
        apply in interface java.util.function.BiFunction<java.lang.String,​java.lang.String,​Single<UserInfo>>
        Parameters:
        userId - a user-id parsed from the authentication token
        password - a password parsed from the authentication token
        Returns:
        Single<BasicAuthHttpServiceFilter.CredentialsVerifier> with a user info object of authenticated user or Single failed with an AuthenticationException if access was denied