Requests

  • A class that makes loading data from a protected endpoint easier.

    See more

    Declaration

    Swift

    open class OAuth2DataLoader : OAuth2Requestable
  • A struct encapsulating an OAuth2 request made to obtain data.

    See more

    Declaration

    Swift

    public struct OAuth2DataRequest
  • Class representing an OAuth2 authorization request that can be used to create NSURLRequest instances.

    See more

    Declaration

    Swift

    open class OAuth2AuthRequest
  • Protocol for types that can perform URLRequests.

    The class OAuth2DataTaskRequestPerformer implements this protocol and is by default used by all OAuth2 classes to perform requests.

    See more

    Declaration

    Swift

    public protocol OAuth2RequestPerformer
  • Simple implementation of OAuth2RequestPerformer, using URLSession.dataTask() to perform requests.

    See more

    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:

    perform(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`
        }
    }
    
    See more

    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 more

    Declaration

    Swift

    public struct OAuth2RequestParams
  • HTTP methods for auth requests.

    See more

    Declaration

    Swift

    public enum OAuth2HTTPMethod : String
  • Content types that will be specified in the request header under “Content-type”.

    See more

    Declaration

    Swift

    public enum OAuth2HTTPContentType : String
  • The auth method supported by the endpoint.

    See more

    Declaration

    Swift

    public enum OAuth2EndpointAuthMethod : String