Skip to content

Commit

Permalink
fixed problems with userpass authentication
Browse files Browse the repository at this point in the history
  • Loading branch information
sksadjad committed Jun 17, 2022
1 parent 9fefae8 commit 5f424d7
Show file tree
Hide file tree
Showing 2 changed files with 25 additions and 25 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -6,20 +6,20 @@ type ConfiguredAgent = TAgent<IMsVcApiIssuer>
export default (testContext: { getAgent: () => ConfiguredAgent; setup: () => Promise<boolean>; tearDown: () => Promise<boolean> }) => {
describe('Issuer Agent Plugin', () => {
let agent: TAgent<IMsVcApiIssuer>
agent = createAgent({
plugins:[
new MsVcApiIssuer({
authenticationType: MsAuthenticationTypeEnum.ClientCredential,
authenticationArgs: {
azClientId: '<client_id>',
azClientSecret:'<client_secret>',
azTenantId: '<tenant_id>',
credentialManifest:'<credential_manifest>'
}})]
})

beforeAll(async () => {
await testContext.setup()
agent = testContext.getAgent()
agent = createAgent({
plugins:[
new MsVcApiIssuer({
authenticationType: MsAuthenticationTypeEnum.ClientCredential,
authenticationArgs: {
azClientId: '<client_id>',
azClientSecret:'<client_secret>',
azTenantId: '<tenant_id>',
credentialManifest:'<credential_manifest>'
}})]
})
})

afterAll(async () => {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,21 +7,21 @@ type ConfiguredAgent = TAgent<IMsVcApiIssuer>
export default (testContext: { getAgent: () => ConfiguredAgent; setup: () => Promise<boolean>; tearDown: () => Promise<boolean> }) => {
describe('Issuer Agent Plugin', () => {
let agent: TAgent<IMsVcApiIssuer>
agent = createAgent({
plugins:[
new MsVcApiIssuer({
authenticationType: MsAuthenticationTypeEnum.UsernamePassword,
authenticationArgs: {
azTenantId: '<tenant_id>',
azClientId: '<client_id>',
scopes: ["user.read"],
username: '<username>',
password:'<password>',
}})]
})

beforeAll(async () => {
await testContext.setup()
agent = testContext.getAgent()
agent = createAgent({
plugins:[
new MsVcApiIssuer({
authenticationType: MsAuthenticationTypeEnum.UsernamePassword,
authenticationArgs: {
azTenantId: '<tenant_id>',
azClientId: '<client_id>',
scopes: ["user.read"],
username: '<username>',
password:'<password>',
}})]
})
})

afterAll(async () => {
Expand Down

0 comments on commit 5f424d7

Please sign in to comment.