OAuth2TokenStore
public protocol OAuth2TokenStore
Defines a protocol which is capable of storing an OAuth2Token.
-
Stores the
OAuth2Tokenfor the given URL.Declaration
Swift
func store(token: OAuth2Token, for url: URL) throwsParameters
tokenthe token to be stored
forthe url the token is associated to
-
Retrieves the
OAuth2Tokenfor the given URL.Declaration
Swift
func token(for url: URL) throws -> OAuth2Token?Parameters
urlthe url which the token is needed for
Return Value
the token associated with the url, nil if not found
-
Deletes the
OAuth2Tokenfor the given URL.Declaration
Swift
func deleteToken(for url: URL) throwsParameters
urlthe url which the token is no longer needed
-
clear()Default implementationClears the tokens
Default Implementation
Default implementation of clear method, does nothing.
Declaration
Swift
func clear()