Fetches credentials for the given resource.
Checks whether the implementation is able to provide authentication for the given URL.
StaticcreateCreates an API factory that enables auth for each of the default SCM providers.
StaticforStaticforCreates a new ScmAuth instance that handles authentication towards Azure.
The host option determines which URLs that are handled by this instance and defaults to dev.azure.com.
The default scopes are:
vso.build vso.code vso.graph vso.project vso.profile
If the additional repoWrite permission is requested, these scopes are added:
vso.code_manage
Optionaloptions: { host?: string }StaticforCreates a new ScmAuth instance that handles authentication towards Bitbucket.
The host option determines which URLs that are handled by this instance and defaults to bitbucket.org.
The default scopes are:
account team pullrequest snippet issue
If the additional repoWrite permission is requested, these scopes are added:
pullrequest:write snippet:write issue:write
Optionaloptions: { host?: string; scopeMapping?: { default?: string[]; repoWrite?: string[] } }StaticforCreates a new ScmAuth instance that handles authentication towards Bitbucket Server.
The host option determines which URLs that are handled by this instance.
The default scopes are:
PUBLIC_REPOS REPO_READ
If the additional repoWrite permission is requested, these scopes are added:
REPO_WRITE
StaticforCreates a new ScmAuth instance that handles authentication towards GitHub.
The host option determines which URLs that are handled by this instance and defaults to github.com.
The default scopes are:
repo read:org read:user
If the additional repoWrite permission is requested, these scopes are added:
gist
Optionaloptions: { host?: string }StaticforCreates a new ScmAuth instance that handles authentication towards GitLab.
The host option determines which URLs that are handled by this instance and defaults to gitlab.com.
The default scopes are:
read_user read_api read_repository
If the additional repoWrite permission is requested, these scopes are added:
write_repository api
Optionaloptions: { host?: string }StaticmergeMerges together multiple ScmAuth instances into one that routes requests to the correct instance based on the URL.
An implementation of the ScmAuthApi that merges together OAuthApi instances to form a single instance that can handles authentication for multiple providers.
Example