OAuth2Family

public enum OAuth2Family : Hashable, SelfIdentifiable

A value that identifies a provider of the OAuth2 family.

It is used for the associated value of the .oAuth2(_:) case.

Cases

  • The Apple provider.

    Declaration

    Swift

    case apple
  • The Facebook provider.

    Declaration

    Swift

    case facebook
  • The GitHub provider.

    Declaration

    Swift

    case gitHub
  • The GitLab provider.

    Declaration

    Swift

    case gitLab
  • The Google provider.

    Declaration

    Swift

    case google
  • The LinkedIn provider.

    Declaration

    Swift

    case linkedin
  • The Orange Connect provider.

    Declaration

    Swift

    case orangeConnect
  • The Orange provider for employees.

    Declaration

    Swift

    case orangeEmployees
  • The Orange France provider for customers.

    Declaration

    Swift

    case orangeFrance
  • The Orange Mobile Connect provider.

    The associated value is the ISO 3166 alpha-2 code of the country (e.g.FR for France) of the SIM card to authenticate. It is nil when the country code is not available.

    To authenticate using the AuthenticationMethodOAuth2 method, the associated value must correspond to the code of a country where Orange Mobile Connect is available: it cannot be nil. On the other hand, when the current user is authenticated using this provider, the value of the provider property of the AuthenticationDetails will always be .orangeMobileConnect(countryCode: nil).

    Declaration

    Swift

    case orangeMobileConnect(countryCode: String?)
  • A custom OpenID Connect provider.

    The associated value is the identifier of the provider on the back-end.

    Declaration

    Swift

    case openIDConnect(identifier: String)
  • A custom OAuth2 provider.

    The associated value is the identifier of the provider on the back-end.

    This case allows to support providers added after the publication of the SDK.

    Declaration

    Swift

    case other(identifier: String)

Stored Properties

  • The value of the provider property of the AuthenticationDetails when the current user if authenticated using the Orange Mobile Connect provider.

    This is a shortcut for .orangeMobileConnect(countryCode: nil).

    Declaration

    Swift

    public static let orangeMobileConnect: OAuth2Family

API

  • The pretty name of this provider.

    Declaration

    Swift

    public var prettyName: String { get }
  • Indicates whether this value matches a pattern.

    This operator behaves like the equality operator (==), except when the pattern is equal to.orangeMobileConnect(countryCode: nil) in which case it returns true if and only if this value matches the .orangeMobileConnect(countryCode:) case regardless of the countryCode associated value.

    Declaration

    Swift

    public func matches(with pattern: OAuth2Family) -> Bool

    Parameters

    pattern

    The pattern to match this value with.

    Return Value

    true when this value matches the pattern, false otherwise.