Credentials

public struct Credentials

Struct used to specify the type of authentication being used.

  • A bearer token, for example a JWT. This will be sent in an Authorization: Bearer header.

    Declaration

    Swift

    public static func bearerAuthentication(token: String) -> Credentials
  • Basic username/password authentication. This will be used to construct an Authorization: Basic header.

    Declaration

    Swift

    public static func basicAuthentication(username: String, password: String) -> Credentials