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

com.teststeps.thekla4j.http.spp.Authorization Maven / Gradle / Ivy

package com.teststeps.thekla4j.http.spp;

import java.util.function.Function;

public enum Authorization implements HttpHeaderValue {

  BASIC(x -> "Basic " + x),
  BEARER(x -> "Bearer " + x),;

  private final Function headerFunc;
  private String value;

  public final String asString() {
    return headerFunc.apply(value);
  };

  public Authorization of(String value) {
    this.value = value;
    return this;
  }
  private Authorization(Function f) {
    this.headerFunc = f;
  }

}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy