OAuth2DataLoaderSessionTaskDelegate

open class OAuth2DataLoaderSessionTaskDelegate : NSObject, URLSessionTaskDelegate

Simple implementation of a session task delegate, which looks at HTTP redirecting, approving redirects in the same domain and re-signing the redirected request.

  • The loader to which the delegate belongs, needed for request signing.

    Declaration

    Swift

    public internal(set) weak var loader: OAuth2DataLoader? { get }
  • Only redirects against this host will be approved.

    Declaration

    Swift

    public let host: String
  • Designated initializer.

    Declaration

    Swift

    public init(loader: OAuth2DataLoader, host: String)

    Parameters

    loader

    The data loader for which the receiver is delegating

    host

    The host on which HTTP redirecting will be approved; will be run through URLComponents to satisfy formatting

URLSessionTaskDelegate