                        Request.contentType : "application/x-www-form-urlencoded"]
         } catch (_) {
             TokenManager.logger.error(message: "Failed to create authentication header")
-            tokenResponseDelegate.onAuthorizationFailure(error: AuthorizationError.authorizationFailure("Failed to create authentication header"))
+            tokenResponseDelegate.onAuthorizationFailure(error: .authorizationFailure("Failed to create authentication header"))
             return
         }
         

        
        guard let responseText = response.responseText else {
            TokenManager.logger.error(message: "Failed to parse server response - no response text")
            tokenResponseDelegate.onAuthorizationFailure(error: AuthorizationError.authorizationFailure("Failed to parse server response - no response text"))
            return
        }
        do {

        
        guard let clientId = self.registrationManager.getRegistrationDataString(name: AppIDConstants.client_id_String), let redirectUri = self.registrationManager.getRegistrationDataString(arrayName: AppIDConstants.JSON_REDIRECT_URIS_KEY, arrayIndex: 0) else {
            TokenManager.logger.error(message: "Client not registered")
            authorizationDelegate.onAuthorizationFailure(error: .authorizationFailure("Client not registered"))
            return
        }
        
