Identity providers

The Onegini SDK allows you to choose between multiple identity providers.


In order for an identity provider to be available it needs to be correctly configured in the Token Server. The list of available identity providers can be fetched using - (NSSet<ONGIdentityProvider *> *)identityProviders; method on ONGUserClient instance.

NSSet <ONGIdentityProviders *> *identityProviders = [ONGUserClient sharedInstance].identityProviders;

The class representing an identity provider is called ONGIdentityProvider. Objects of that class are DTOs, once returned by the SDK their property values will not be changed or updated. ONGIdentityProvider has the following properties:

  • identifier (NSString) - unique identifier defined in the Token Server admin panel.
  • name (NSString) - human-readable name defined in the Token Server admin panel.
  • externalIdentityProvider (ONGExternalIdentityProvider) - an external identity provider.

External identity providers are represented by ONGExternalIdentityProvider class, which has the following properties:

  • name (NSString) - name of an external identity provider.
  • type (NSString) - type of an external identity provider.

Instance of ONGIdentityProvider can be used when initiating user registration to select an indentity provider instead of using the default one picked by the Token Server.

NSSet <ONGIdentityProviders *> *identityProviders = [ONGUserClient sharedInstance].identityProviders;
ONGIdentityProvider *yourIdentityProvider = [identityProviders filteredSetUsingPredicate:yourPredicate].anyObject;
[[ONGUserClient sharedInstance] registerUserWithIdentityProvider:yourIdentityProvider scopes:yourScopes delegate:self];

results matching ""

    No results matching ""