2021-07-26 10:20:36 +00:00
|
|
|
<h2>@sourav_chanduka/oidc-client</h2>
|
2021-07-01 02:41:28 +00:00
|
|
|
|
|
|
|
<h3>Usage</h3>
|
|
|
|
|
|
|
|
You can use this package to interact with the github oidc provider.
|
|
|
|
|
|
|
|
<h3>Get the ID token</h3>
|
|
|
|
|
|
|
|
Method Name: getIDToken
|
|
|
|
|
|
|
|
<h3>Inputs</h3>
|
|
|
|
|
2021-07-26 10:20:36 +00:00
|
|
|
audience : optional
|
2021-07-01 02:41:28 +00:00
|
|
|
|
|
|
|
<h3>Example:</h3>
|
|
|
|
|
|
|
|
```
|
|
|
|
const core = require('@actions/core');
|
|
|
|
const id = require('@actions/oidc-client')
|
|
|
|
|
|
|
|
|
|
|
|
async function getID(){
|
|
|
|
const id_token = await id.getIDToken('client-id', 'client-secret')
|
|
|
|
const val = `ID token is ${id_token}`
|
|
|
|
core.setOutput('id_token', id_token);
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
getID()
|
|
|
|
```
|