Azure DevOps Personal Access Token Issuer
This provides a CLI and package to issue Azure DevOps Personal Access Tokens for the calling user. The calling user will be authenticated using MSAL (OIDC) Interactive login.
Usage:
> patissuer --aad-tenant-id <your-aad-tenant-id> --aad-client-id <your-aad-client-id> --org-url <your Azure DevOps organization URL> list
> patissuer --aad-tenant-id <your-aad-tenant-id> --aad-client-id <your-aad-client-id> --org-url <your Azure DevOps organization URL> issue --token-scope <pat-token-access-scopes> --token-ttl
All command line flags can be replaced with env variables. The format is: PATISSUER_<flag-with-underscore>
, so for example --aad-tenant-id
can be replaced with the PATISSUER_AAD_TENANT_ID
env variable
Using the --output
flag, you can control the ouput format. Supported values are:
- raw - plain text format
- json - result formatted as json
- Visual Studio Code https://code.visualstudio.com/Download
- Remote - Containers extension for VS Code:
ms-vscode-remote.remote-containers
- [windows/amd64] Cascadia Code PL (Powerline) font needed for the VS Code terminal (Download).
In VS Code typeCtrl+,
to bring upSettings
, then search forterminal.integrated.fontFamily
and enter'Cascadia Code PL'
with quotes.
The complete toolchain and environment needed to develop is defined in a DevContainer in the .devcontainer
folder.
- Open the repo in VSCode
- Hit
F1
and type/selectRemote-Containers: Reopen in Container
Note: The first time you open the container (or when it has been updated) it may take a while because the container needs to be built.
Building is done using Mage
> mage build
This will be done by default when building.
> mage toolinstall
> mage test
> mage watch
> mage
This repo is structured to conform with the Go Language Standard Project Layout
Furthermore, linting is required and enabled by default.
- Visual Studio Code: Code.VisualStudio.Com/Download
- Remote - Containers extension for VS Code:
ms-vscode-remote.remote-containers
- Go: golang.org - included in dev container
- Mage (Build system): magefile.org - included in dev container
- Ginkgo/Gomega (Test framework): onsi.github.io/ginkgo