oidc client changes

This commit is contained in:
Sourav Chanduka
2021-07-20 08:58:34 +05:30
parent 1322acbcca
commit f7330892f1
13 changed files with 15328 additions and 1298 deletions

View File

@@ -1,20 +1,20 @@
import * as get from '../src/main'
import {getIDTokenUrl} from './../src/internal/config-variables'
import {HttpClient} from '@actions/http-client'
test('Get httpclient', () => {
let http: HttpClient = new HttpClient('actions/oidc-client')
const http = new HttpClient('actions/oidc-client')
expect(http).toBeDefined()
})
test('HTTP get request to get token endpoint', async () => {
let http: HttpClient = new HttpClient('actions/oidc-client')
let res = await http.get(
const http = new HttpClient('actions/oidc-client')
const res = await http.get(
'https://ghactionsoidc.azurewebsites.net/.well-known/openid-configuration'
)
expect(res.message.statusCode).toBe(200)
})
test('Get token endpoint', async () => {
let url: string = await get.getTokenEndPoint()
let url; url = getIDTokenUrl()
expect(url).toBeDefined()
})