OAuth2CodeGrantBasicAuth

open class OAuth2CodeGrantBasicAuth: OAuth2CodeGrant

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).

  • Adds support to override the basic Authorization header value by specifying:

    • basic: takes precedence over client_id and client_secret for the token request Authorization header

    Declaration

    Swift

    override public init(settings: OAuth2JSON)
  • Calls super’s implementation to obtain a token request, then adds the custom Basic authorization header.

    Declaration

    Swift

    override open func accessTokenRequest(with code: String, params: OAuth2StringDict? = nil) throws -> OAuth2AuthRequest