Requests
-
A class that makes loading data from a protected endpoint easier.
See moreDeclaration
Swift
open class OAuth2DataLoader : OAuth2Requestable
-
A struct encapsulating an OAuth2 request made to obtain data.
See moreDeclaration
Swift
public struct OAuth2DataRequest
-
Class representing an OAuth2 authorization request that can be used to create NSURLRequest instances.
See moreDeclaration
Swift
open class OAuth2AuthRequest
-
Protocol for types that can perform
URLRequest
s.The class
See moreOAuth2DataTaskRequestPerformer
implements this protocol and is by default used by allOAuth2
classes to perform requests.Declaration
Swift
public protocol OAuth2RequestPerformer
-
Simple implementation of
See moreOAuth2RequestPerformer
, usingURLSession.dataTask()
to perform requests.Declaration
Swift
open class OAuth2DataTaskRequestPerformer : OAuth2RequestPerformer
-
Encapsulates a URLResponse to a URLRequest.
Instances of this class are returned from
OAuth2Requestable
calls, they can be used like so:
See moreperform(request: req) { response in do { let data = try response.responseData() // do what you must with `data` as Data and `response.response` as HTTPURLResponse } catch let error { // the request failed because of `error` } }
Declaration
Swift
open class OAuth2Response
-
Typealias to work with headers.
Declaration
Swift
public typealias OAuth2Headers = [String : String]
-
Struct to hold on to request parameters.
Provides utility functions so the parameters can be correctly encoded for use in URLs and request bodies.
See moreDeclaration
Swift
public struct OAuth2RequestParams
-
HTTP methods for auth requests.
See moreDeclaration
Swift
public enum OAuth2HTTPMethod : String
-
Content types that will be specified in the request header under “Content-type”.
See moreDeclaration
Swift
public enum OAuth2HTTPContentType : String
-
The auth method supported by the endpoint.
See moreDeclaration
Swift
public enum OAuth2EndpointAuthMethod : String