OAuth2

  • Simple struct to hold settings describing how authorization appears to the user.

    See more

    Declaration

    Swift

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

    See more

    Declaration

    Swift

    open class OAuth2AuthRequest
  • The auth method supported by the endpoint.

    See more

    Declaration

    Swift

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

    See more

    Declaration

    Swift

    public enum OAuth2HTTPContentType: String
  • HTTP methods for auth requests.

    See more

    Declaration

    Swift

    public enum OAuth2HTTPMethod: 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
  • This authorizer takes care of iOS-specific tasks when showing the authorization UI.

    You can subclass this class and override willPresent(viewController:naviController:) in order to further customize presentation of the UI.

    See more

    Declaration

    Swift

    open class OAuth2Authorizer: OAuth2AuthorizerUI
  • Class extending on OAuth2Requestable, exposing configuration and maintaining context, serving as base class for OAuth2.

    See more

    Declaration

    Swift

    open class OAuth2Base: OAuth2Securable
  • Class, internally used, to store current authorization context, such as state and redirect-url.

    See more

    Declaration

    Swift

    open class OAuth2ContextStore
  • Client configuration object that holds on to client-server specific configurations such as client id, -secret and server URLs.

    See more

    Declaration

    Swift

    open class OAuth2ClientConfig
  • A class to handle authorization for confidential clients via the authorization code grant method.

    This auth flow is designed for clients that are capable of protecting their client secret but can be used from installed apps. During code exchange and token refresh flows, if the client has a secret, a Basic key:secret Authorization header will be used. If not the client key will be embedded into the request body.

    See more

    Declaration

    Swift

    open class OAuth2CodeGrant: OAuth2
  • Enhancing the code grant flow by allowing to specify a specific Basic xx authorization header.

    This class allows you to manually set the Authorization header to a given string, as accepted in its basicToken property. It will override the superclasses automatic generation of an Authorization header if the client has a clientSecret, so you only need to use this subclass if you need a different header (this is different to version 1.2.3 and earlier of this framework).

    See more

    Declaration

    Swift

    open class OAuth2CodeGrantBasicAuth: OAuth2CodeGrant
  • An URLSession delegate that allows you to use self-signed SSL certificates.

    Doing so is a REALLY BAD IDEA, even in development environments where you can use real, free certificates that are valid a few months. Still, sometimes you’ll have to do this so this class is provided, but DO NOT SUBMIT your app using self-signed SSL certs to the App Store. You have been warned!

    See more

    Declaration

    Swift

    open class OAuth2DebugURLSessionDelegate: NSObject, URLSessionDelegate
  • Class to handle OAuth2 Dynamic Client Registration.

    This is a lightweight class that uses a OAuth2 instance’s settings when registering, only few settings are held by instances of this class. Hence it’s highly portable and can be instantiated when needed with ease.

    For the full OAuth2 Dynamic Client Registration spec see https://tools.ietf.org/html/rfc7591

    See more

    Declaration

    Swift

    open class OAuth2DynReg
  • Typealias to work with headers.

    Declaration

    Swift

    public typealias OAuth2Headers = [String: String]
  • Typealias to ease working with JSON dictionaries.

    Declaration

    Swift

    public typealias OAuth2JSON = [String: Any]
  • Abstract base class for OAuth2 authorization as well as client registration classes.

    See more

    Declaration

    Swift

    open class OAuth2Requestable
  • Typealias to work with dictionaries full of strings.

    Declaration

    Swift

    public typealias OAuth2StringDict = [String: String]
  • Class to handle OAuth2 requests for public clients, such as distributed Mac/iOS Apps.

    See more

    Declaration

    Swift

    open class OAuth2ImplicitGrant: OAuth2
  • A class to handle authorization for clients via password grant.

    If no credentials are set when authorizing, a native controller is shown so that the user can provide them.

    See more

    Declaration

    Swift

    open class OAuth2PasswordGrant: OAuth2
  • 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
  • A simple iOS web view controller that allows you to display the login/authorization screen.

    See more

    Declaration

    Swift

    open class OAuth2WebViewController: UIViewController, WKNavigationDelegate