Get the auth fields (decrypted) needed to make a connection.
Get the authorization fields.
Get the SFDX Auth URL.
Get the username.
Initializes an instance of the AuthInfo class.
Returns true if this is using an access token flow.
Returns true if this is using the JWT flow.
Returns true if this is using the oauth flow.
Returns true if this is using the refresh token flow.
Returns true if this org is using access token auth.
Updates the cache and persists the authentication fields (encrypted).
Update the authorization fields, encrypting sensitive fields, but do not persist.
Authorization fields to update.
Encrypt the fields.
For convenience this object is returned.
Forces the auth file to be re-read from disk for a given user.
The username for the auth info to re-read.
True if a value was removed.
Asynchronously constructs and initializes a new instance of a concrete subclass with the provided options.
An options object providing initialization params to the async constructor.
Get the authorization URL.
The options to generate the URL.
Returns true if one or more authentications are persisted.
Get a list of all auth files stored in the global directory.
Handles persistence and fetching of user authentication information using JWT, OAuth, or refresh tokens. Sets up the refresh flows that jsForce will use to keep tokens active. An AuthInfo can also be created with an access token, but AuthInfos created with access tokens can't be persisted to disk.
// Creating a new authentication file. const authInfo = await AuthInfo.create(myAdminUsername, { loginUrl, authCode, clientId, clientSecret }); authInfo.save();
// Creating an authorization info with an access token. const authInfo = await AuthInfo.create(accessToken);
// Using an existing authentication file. const authInfo = await AuthInfo.create(myAdminUsername);
// Using the AuthInfo const connection = await Connection.create(authInfo);
https://developer.salesforce.com/docs/atlas.en-us.sfdx_dev.meta/sfdx_dev/sfdx_dev_auth.htm
https://developer.salesforce.com/docs/atlas.en-us.sfdx_dev.meta/sfdx_dev/sfdx_dev_cli_usernames_orgs.htm