OAuth2
-
Base class for specific OAuth2 flow implementations.
See moreDeclaration
Swift
open class OAuth2: OAuth2Base
-
Simple struct to hold settings describing how authorization appears to the user.
See moreDeclaration
Swift
public struct OAuth2AuthConfig
-
Class representing an OAuth2 authorization request that can be used to create NSURLRequest instances.
See moreDeclaration
Swift
open class OAuth2AuthRequest
-
The auth method supported by the endpoint.
See moreDeclaration
Swift
public enum OAuth2EndpointAuthMethod: String
-
Content types that will be specified in the request header under
See moreContent-type
.Declaration
Swift
public enum OAuth2HTTPContentType: String
-
HTTP methods for auth requests.
See moreDeclaration
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 moreDeclaration
Swift
public struct OAuth2RequestParams
-
This authorizer takes care of iOS-specific tasks when showing the authorization UI.
You can subclass this class and override
See morewillPresent(viewController:naviController:)
in order to further customize presentation of the UI.Declaration
Swift
open class OAuth2Authorizer: OAuth2AuthorizerUI
-
Class extending on OAuth2Requestable, exposing configuration and maintaining context, serving as base class for
See moreOAuth2
.Declaration
Swift
open class OAuth2Base: OAuth2Securable
-
Class, internally used, to store current authorization context, such as state and redirect-url.
See moreDeclaration
Swift
open class OAuth2ContextStore
-
Client configuration object that holds on to client-server specific configurations such as client id, -secret and server URLs.
See moreDeclaration
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
See moreBasic key:secret
Authorization header will be used. If not the client key will be embedded into the request body.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
See moreAuthorization
header to a given string, as accepted in itsbasicToken
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).Declaration
Swift
open class OAuth2CodeGrantBasicAuth: OAuth2CodeGrant
-
An iOS and tvOS-specific implementation of the
See moreOAuth2CustomAuthorizerUI
protocol which modally presents the login controller.Declaration
Swift
public class OAuth2CustomAuthorizer: OAuth2CustomAuthorizerUI
-
Simple implementation of
See moreOAuth2RequestPerformer
, usingURLSession.dataTask()
to perform requests.Declaration
Swift
open class OAuth2DataTaskRequestPerformer: OAuth2RequestPerformer
-
Basic logger that just prints to stdout.
See moreDeclaration
Swift
open class OAuth2DebugLogger: OAuth2Logger
-
Logging levels
See moreDeclaration
Swift
public enum OAuth2LogLevel: Int, CustomStringConvertible
-
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 moreDeclaration
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 moreDeclaration
Swift
open class OAuth2DynReg
-
All errors that might occur.
The response errors return a description as defined in the spec: http://tools.ietf.org/html/rfc6749#section-4.1.2.1
See moreDeclaration
Swift
public enum OAuth2Error: Error, CustomStringConvertible, Equatable
-
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 moreDeclaration
Swift
open class OAuth2Requestable
-
Typealias to work with dictionaries full of strings.
Declaration
Swift
public typealias OAuth2StringDict = [String: String]
-
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
-
Base class to add keychain storage functionality.
See moreDeclaration
Swift
open class OAuth2Securable: OAuth2Requestable
-
A simple iOS web view controller that allows you to display the login/authorization screen.
See moreDeclaration
Swift
open class OAuth2WebViewController: UIViewController, WKNavigationDelegate