Skip to content
Pascal Pfiffner edited this page Jun 14, 2016 · 2 revisions

The call graph for authorize(), as of version 2.2.7, is as follows:

authorize()
  tryToObtainAccessTokenIfNeeded()
    hasUnexpiredAccessToken()
      YES: didAuthorize() ✅
      NO:  doRefreshToken()
        DID-REFRESH: didAuthorize() ✅
  
  registerClientIfNeeded()
    NEEDED: onBeforeDynamicClientRegistration()
      OAuth2DynReg.registerClient()
      FAIL: didFail() 🚫
  
  doAuthorize()
    EMBEDDED:
    authorizeEmbeddedWith()
      authorizeSafariEmbeddedFromViewController()
        authorizeURL()
        presentSafariViewFor()
          CANCEL: didFail() 🚫
    
    BROWSER:
    openAuthorizeURLInBrowser()
      authorizeURL()
      [open in Safari]
    
    CALLBACK IMPLICIT GRANT:
    handleRedirectURL()
      parseAccessTokenResponse()
      SUCCESS: didAuthorize() ✅
      FAILED:  didFail() 🚫
    
    CALLBACK CODE GRANT:
    handleRedirectURL()
      validateRedirectURL()
        exchangeCodeForToken()
          tokenRequestWithCode()
          performRequest()
            parseAccessTokenResponseData()
              SUCCESS: didAuthorize() ✅
              FAILED:  didFail() 🚫
            FAILED: didFail() 🚫
          ERROR: didFail() 🚫
        ERROR: didFail() 🚫
      INVALID: didFail() 🚫
Clone this wiki locally