ApiToken

com.worxbend.codeberg4s.auth.ApiToken
See theApiToken companion class
object ApiToken

Attributes

Companion
class
Graph
Supertypes
class Object
trait Matchable
class Any
Self type
ApiToken.type

Members list

Value members

Concrete methods

def from(value: String): Either[ValidationError, ApiToken]

Parses a token.

Parses a token.

Trims surrounding whitespace, because tokens are usually read from an environment variable or a file that carries a trailing newline. Rejects an empty or blank value and any value containing a control character, since such a value cannot be put in a header without splitting the request.

The returned ValidationError describes the failure on the "apiToken" field and never echoes the rejected input.

Attributes

Concrete fields

val Redacted: String

The mask returned by ApiToken.redacted and by toString.

The mask returned by ApiToken.redacted and by toString.

Attributes