Disruptive Documentation

Structure Auth

public struct Auth  

Encapsulates authentication details like access token and expiration date.

This type is only useful when implementing a type that conforms to Authenticator, and does not need to be accessed or created in any other circumstances.

Initializers

init(token:​expiration​Date:​)

public init(token: String, expirationDate: Date)  

Creates a new Auth instance

Properties

token

public let token: String

The current token to use for authentication. This String needs to be prefixed with the authentication scheme. Eg: "Basic ..." or "Bearer ..."

expiration​Date

public let expirationDate: Date

The expiration date of the token.