All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.github.monkeywie.proxyee.server.auth.HttpProxyAuthenticationProvider Maven / Gradle / Ivy

package com.github.monkeywie.proxyee.server.auth;

import com.github.monkeywie.proxyee.server.auth.model.HttpToken;
import io.netty.handler.codec.http.HttpHeaderNames;
import io.netty.handler.codec.http.HttpRequest;

/**
 * @Author LiWei
 * @Description
 * @Date 2021/1/15 14:12
 */
public interface HttpProxyAuthenticationProvider {
    String authType();

    String authRealm();

    R authenticate(String authorization);

    default R authenticate(HttpRequest request) {
      return authenticate(request.headers().get(HttpHeaderNames.PROXY_AUTHORIZATION));
    }

    default boolean matches(HttpRequest request) {
        return true;
    }
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy