package net.northking.cctp.element.internal.protocol.http.auth;

/**
 * AuthScheme
 *
 * @author fengxiang.zhang
 * @since 1.0
 */
public enum AuthScheme {
    NONE, Basic, Digest, NTLM, OAuth2;

    public static AuthScheme from(String type) {
        for (AuthScheme e : AuthScheme.values()) {
            if (e.name().equalsIgnoreCase(type)) {
                return e;
            }
        }
        throw new IllegalArgumentException(String.format("认证类型:%s 未被支持", type));
    }
}