Twift_AuthenticationType - daneden/Twift GitHub Wiki

Twift.AuthenticationType

The available authentication types for initializing new Twift client instances

public enum AuthenticationType 

Enumeration Cases

userAccessTokens

OAuth 1.0a User Access Token authentication.

@available(*, deprecated, message: "OAuth 1.0a authentication will be removed in a future stable version of Twift. Use the `AuthenticationType.oauth2UserContext` instead.")
    case userAccessTokens(clientCredentials: OAuthCredentials,
                          userCredentials: OAuthCredentials)

User credentials can be obtained by calling Twift.Authentication().requestUserCredentials()

oauth2UserAuth

OAuth 2.0 User Context authentication.

case oauth2UserAuth(_ oauth2User: OAuth2User, onRefresh: ((OAuth2User) -> Void)?)

When this authentication method is used, the oauth2User access token may be automatically refreshed by the client if it has expired.

appOnly

App-only authentication

case appOnly(bearerToken: String)