Get the auth fields (decrypted) needed to make a connection.
OptionalclientApp: stringName of the CA/ECA associated with the user.
Get the authorization fields.
Optionaldecrypt: booleanDecrypt the fields.
Returns a ReadOnly object of the fields. If you need to modify the fields, use AuthInfo.update()
Convenience function to handle typical side effects encountered when dealing with an AuthInfo. Given the values supplied in parameter sideEffects, this function will set auth alias, default auth and default dev hub.
instance of AuthSideEffects
Updates the cache and persists the authentication fields (encrypted).
OptionalauthData: AuthFieldsNew data to save.
Set the target-env (default) or the target-dev-hub to the alias if it exists otherwise to the username. Method will try to set the local config first but will default to global config if that fails.
OptionaldevOptionalorg?: booleanUpdate the authorization fields, encrypting sensitive fields, but do not persist.
For convenience this object is returned.
OptionalauthData: AuthFieldsAuthorization fields to update.
StaticgetGet the authorization URL.
The options to generate the URL.
Optionaloauth2: OAuth2StaticgetStaticgetFind all dev hubs available in the local environment.
StatichasStaticidentifyGiven a set of decrypted fields and an authInfo, determine if the org belongs to an available dev hub, or if the org is a sandbox of another CLI authed production org.
StaticlistGet a list of all authorizations based on auth files stored in the global directory. One can supply a filter (see
A predicate function that returns true for those org authorizations that are to be retained.
StaticparseParse a sfdx auth url, usually obtained by authInfo.getSfdxAuthUrl.
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.
See Authorization
See Salesforce DX Usernames and Orgs