bcgov / bcgov/gwa-cli

Add a command for getting a token from an identity provider

Open
#108 0 comments 0 reactions 0 assignees View on GitHub
jira
Dominant language
Go
Stars
8
Forks
1
PR merge metrics
No merged PRs in 30d

Description

As a convenience, it would be nice to have a command that takes a `client id`, `secret` and `issuer` and make the appropriate calls to get an `access token`.

So the usage would be:

```sh
gwa idp-auth --client-id --client-secret --issuer
```

As an example, the returned access token can be stored in an environment variable and then used in a `curl` command:

```sh
export TOKEN=`gwa idp-auth --client-id --client-secret --issuer `
curl -v https://my-service.api.gov.bc.ca -H "Authorization: Bearer $TOKEN"
```

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.