-
Notifications
You must be signed in to change notification settings - Fork 61
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge remote-tracking branch 'origin/6.0' into sw-backport-6-0-1
- Loading branch information
Showing
10 changed files
with
75 additions
and
11 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,43 @@ | ||
import * as okta from '@okta/okta-sdk-nodejs'; | ||
import { AllowedForEnum } from '@okta/okta-sdk-nodejs'; | ||
import { expect } from 'chai'; | ||
import utils = require('../utils'); | ||
let orgUrl = process.env.OKTA_CLIENT_ORGURL; | ||
|
||
if (process.env.OKTA_USE_MOCK) { | ||
orgUrl = `${orgUrl}/authenticators-update`; | ||
} | ||
|
||
const client = new okta.Client({ | ||
orgUrl: orgUrl, | ||
token: process.env.OKTA_CLIENT_TOKEN, | ||
}); | ||
|
||
describe('Authenticators API tests', () => { | ||
// do not run these tests in a non-OIE context | ||
beforeEach(async function () { | ||
const isOIEOrg = await utils.verifyOrgIsOIE(client); | ||
if (!isOIEOrg) { | ||
this.skip(); | ||
} | ||
}); | ||
|
||
it('should update Authenticator', async () => { | ||
const { value: authenticator} = await client.listAuthenticators().next(); | ||
|
||
let updatedAuthenticator = await client.updateAuthenticator(authenticator.id, { | ||
name: authenticator.name, | ||
settings: { | ||
allowedFor: AllowedForEnum.ANY | ||
} | ||
}); | ||
expect(updatedAuthenticator.settings.allowedFor).to.equal(AllowedForEnum.ANY); | ||
updatedAuthenticator = await client.updateAuthenticator(authenticator.id, { | ||
name: authenticator.name, | ||
settings: { | ||
allowedFor: AllowedForEnum.RECOVERY | ||
} | ||
}); | ||
expect(updatedAuthenticator.settings.allowedFor).to.equal(AllowedForEnum.RECOVERY); | ||
}); | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
import { expectType } from 'tsd'; | ||
|
||
import { Client } from '../../src/types/client'; | ||
import { AccessPolicyRuleConditions } from '../../src/types/models/AccessPolicyRuleConditions'; | ||
import { DeviceAccessPolicyRuleCondition } from '../../src/types/models/DeviceAccessPolicyRuleCondition'; | ||
|
||
|
||
const client = new Client(); | ||
const ruleConditions = new AccessPolicyRuleConditions({}, client); | ||
expectType<DeviceAccessPolicyRuleCondition>(ruleConditions.device); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters