StitchUser
public protocol StitchUser : CoreStitchUser
A set of methods and properties that represent a user that a StitchAppClient is currently authenticated as.
Can be retrieved from a StitchAuth or from the StitchResult of certain methods.
-
The String representation of the ID of this Stitch user.
Declaration
Swift
var id: String { get } -
The type of authentication provider used to log in as this user.
Declaration
Swift
var loggedInProviderType: StitchProviderType { get } -
The name of the authentication provider used to log in as this user.
Declaration
Swift
var loggedInProviderName: String { get } -
A string describing the type of this user. (Either
serverornormal)Declaration
Swift
var userType: String { get } -
A
StitchUserProfileobject describing this user.Declaration
Swift
var profile: StitchUserProfile { get } -
An array of
StitchUserIdentityobjects representing the identities linked to this user which can be used to log in as this user.Declaration
Swift
var identities: [StitchUserIdentity] { get }
-
Links this
StitchUserwith a new identity, where the identity is defined by the credential specified as a parameter. This will only be successful if thisStitchUseris the currently authenticatedStitchUserfor the client from which it was created.Declaration
Swift
func link(withCredential credential: StitchCredential, _ completionHandler: @escaping (StitchResult<StitchUser>) -> Void)Parameters
withCredentialThe
StitchCore.StitchCredentialused to link the user to a new identity. Credentials can be retrieved from an authentication provider client, which is retrieved using thegetProviderClientmethod onStitchAuth.completionHandlerThe completion handler to call when the linking is complete. This handler is executed on a non-main global
DispatchQueue. If the operation is successful, the result will contain aStitchUserobject representing the currently logged in user.
StitchUser Protocol Reference