Structure
Secret
public struct Secret: Codable, Storable
A struct
defining the logged in user authentication parameters.
cookies
and client
are only ever valid as a pair: if you need to change the Client
,
just authenticate again, passing the new one to the Authenticator
.
Relationships
Conforms To
Codable
Storable
Initializers
init?(cookies:client:)
public init?<Cookies: Collection>(cookies: Cookies, client: Client = .default) where Cookies.Element: HTTPCookie
Init.
Parameters
Name | Type | Description |
---|---|---|
cookies | Cookies |
A |
client | Client |
A valid |
init(from:)
public init(from decoder: Decoder) throws
Init.
Parameters
Name | Type | Description |
---|---|---|
decoder | Decoder |
A valid |
Throws
Some Error
related to the decoding process.
Properties
Methods
encode(to:)
public func encode(to encoder: Encoder) throws
Encode into Data
.
Parameters
Name | Type | Description |
---|---|---|
encoder | Encoder |
A valid |
Throws
Some Error
related to the encoding process.
Returns
Some Data
.