MSALNativeAuthUserAccountResult

@objc
public class MSALNativeAuthUserAccountResult : NSObject

Class that groups account and token information.

  • The account object that holds account information.

    Declaration

    Swift

    @objc
    public var account: MSALAccount
  • Get the latest ID token for the account.

    Declaration

    Swift

    @objc
    public var idToken: String? { get }
  • Removes all the data from the cache.

    Declaration

    Swift

    @objc
    public func signOut()
  • Retrieves the access token for the default OIDC(openid, offline_access, profile) scopes from the cache.

    Declaration

    Swift

    @objc
    public func getAccessToken(forceRefresh: Bool = false,
                               correlationId: UUID? = nil,
                               delegate: CredentialsDelegate)

    Parameters

    forceRefresh

    Optional. Ignore any existing access token in the cache and force MSAL to get a new access token from the service.

    correlationId

    Optional. UUID to correlate this request with the server for debugging.

    delegate

    Delegate that receives callbacks for the Get Access Token flow.

  • Retrieves the access token for the currently signed in account from the cache such that the scope of retrieved access token is a superset of requested scopes. If the access token has expired, it will be refreshed using the refresh token that’s stored in the cache. If no access token matching the requested scopes is found in cache then a new access token is fetched.

    Declaration

    Swift

    public func getAccessToken(scopes: [String],
                               forceRefresh: Bool = false,
                               correlationId: UUID? = nil,
                               delegate: CredentialsDelegate)

    Parameters

    scopes

    Permissions you want included in the access token received in the result. Not all scopes are guaranteed to be included in the access token returned.

    forceRefresh

    Optional. Ignore any existing access token in the cache and force MSAL to get a new access token from the service.

    correlationId

    Optional. UUID to correlate this request with the server for debugging.

    delegate

    Delegate that receives callbacks for the Get Access Token flow.