Login
public struct Login: Decodable
A successful authentication result.
-
Token to be used for further login requests.
Declaration
Swift
public let token: String
-
Authenticate via login/password combination.
Declaration
Swift
public static func authenticate(withLogin login: String, andPassword password: String, session: URLSession = .shared, completion: @escaping (Result<Login>) -> Void)Parameters
loginZIH login, e.g.
s1234567passwordpassword
sessionsession to use, defaults to
.sharedcompletionhandler
-
Authenticate via a previously saved token.
Declaration
Swift
public static func authenticate(withToken token: String, session: URLSession = .shared, completion: @escaping (Result<Login>) -> Void)Parameters
tokentoken
sessionsession to use, defaults to
.sharedcompletionhandler
Login Struct Reference