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

org.zodiac.netty.http.headers.BasicCredentialsHeader Maven / Gradle / Ivy

package org.zodiac.netty.http.headers;

import java.util.Objects;

import org.zodiac.commons.http.entities.BasicCredentials;

import io.netty.handler.codec.http.HttpHeaderNames;

class BasicCredentialsHeader extends AbstractHeader {

    BasicCredentialsHeader() {
        super(BasicCredentials.class, HttpHeaderNames.AUTHORIZATION);
    }

    @Override
    public String toString(BasicCredentials value) {
        return Objects.requireNonNull(value, "value").toString();
    }

    @Override
    public BasicCredentials toValue(CharSequence value) {
        return BasicCredentials.parse(Objects.requireNonNull(value, "value"));
    }

}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy