SFUserAccountIdentity Class Reference

Inherits from NSObject
Conforms to NSCopying
NSSecureCoding
Declared in SFUserAccountIdentity.h

Overview

Represents the unique identity of a given user account.

  userId

The user ID associated with the account.

@property (nonatomic, readonly, nonnull) NSString *userId

Declared In

SFUserAccountIdentity.h

  orgId

The organization ID associated with the account.

@property (nonatomic, readonly, nonnull) NSString *orgId

Declared In

SFUserAccountIdentity.h

+ identityWithUserId:orgId:

Convenience method to return a new account identity with the given User ID and Org ID.

+ (nonnull SFUserAccountIdentity *)identityWithUserId:(nonnull NSString *)userId orgId:(nonnull NSString *)orgId

Parameters

userId

The user ID associated with the identity.

orgId

The org ID associated with the identity.

Return Value

An account identity representing the given User ID and Org ID.

Declared In

SFUserAccountIdentity.h

– initWithUserId:orgId:

Creates a new account identity object with the given user ID and org ID.

- (nonnull id)initWithUserId:(nonnull NSString *)userId orgId:(nonnull NSString *)orgId

Parameters

userId

The user ID associated with the identity.

orgId

The org ID associated with the identity.

Declared In

SFUserAccountIdentity.h

– compare:

Compares this identity with another. Useful for [NSArray sortedArrayUsingSelector:].

- (NSComparisonResult)compare:(SFUserAccountIdentity *)otherIdentity

Parameters

otherIdentity

The other identity to compare to this one.

Return Value

NSOrderedAscending if other is greater, NSOrderedDescending if other is less, NSOrderedSame if they’re equal.

Declared In

SFUserAccountIdentity.h

– matchesCredentials:

Compares the user identifying information of the account identity with that in the credentials.

- (BOOL)matchesCredentials:(SFOAuthCredentials *)credentials

Parameters

credentials

The OAuthCredentials to compare against

Return Value

BOOL Whether or not the user contained is the same

Declared In

SFUserAccountIdentity.h