Authorization

public struct Authorization

Responsible to add Authorization Headers to URLRequest.

  • Generates an instance with scheme and token

    • paramter token: Plain string to sign requests.

    Declaration

    Swift

    public init(scheme: Scheme, token: String)

    Parameters

    scheme

    Type of authorization header request.

    Return Value

    New Authorization instance.

  • Standard scheme for authorization requests

    See more

    Declaration

    Swift

    enum Scheme: String
  • Inject Authorization header to URLRequest

    Declaration

    Swift

    public func prepare(request: URLRequest) -> URLRequest