-
Notifications
You must be signed in to change notification settings - Fork 41
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: accepts oktaAuthConfig when creating authClient - OKTA-385237
doc: update changelog lint use tsd remove dtslint update 8ac0n yml OKTA-385237 <<<Jenkins Check-In of Tested SHA: 3637d52 for [email protected]>>> Artifact: okta-react-native Files changed count: 10 PR Link: "#147"
- Loading branch information
1 parent
ac1953e
commit 6aae113
Showing
10 changed files
with
391 additions
and
566 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
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
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
This file was deleted.
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,73 @@ | ||
/* | ||
* Copyright (c) 2021-Present, Okta, Inc. and/or its affiliates. All rights reserved. | ||
* The Okta software accompanied by this notice is provided pursuant to the Apache License, Version 2.0 (the "License.") | ||
* | ||
* You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0. | ||
* Unless required by applicable law or agreed to in writing, software | ||
* distributed under the License is distributed on an "AS IS" BASIS, WITHOUT | ||
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
* | ||
* See the License for the specific language governing permissions and limitations under the License. | ||
*/ | ||
|
||
|
||
/* eslint-disable node/no-missing-import, camelcase */ | ||
import OktaSDK, { Okta } from './index'; | ||
import { expectType } from 'tsd'; | ||
|
||
expectType<Promise<boolean>>(OktaSDK.createConfig({ | ||
issuer: '{issuer}', | ||
clientId: '{clientID}', | ||
redirectUri: '{redirectUri}', | ||
endSessionRedirectUri: '{endSessionRedirectUri}', | ||
discoveryUri: '{discoveryUri}', | ||
scopes: ['scope1', 'scope2'], | ||
requireHardwareBackedKeyStore: false, | ||
androidChromeTabColor: '#00000', | ||
httpConnectionTimeout: 15, | ||
httpReadTimeout: 10, | ||
browserMatchAll: false, | ||
oktaAuthConfig: {} | ||
})); | ||
|
||
expectType<Okta.StringAnyMap>(OktaSDK.getAuthClient()); | ||
|
||
expectType<Promise<Okta.AuthenticationResponse>>(OktaSDK.signIn()); | ||
|
||
expectType<Promise<Okta.AuthenticationResponse>>(OktaSDK.signIn({ username: '{username}', password: '{password}' })); | ||
|
||
expectType<Promise<Okta.AuthenticationResponse>>(OktaSDK.signInWithBrowser()); | ||
|
||
expectType<Promise<Okta.AuthenticationResponse>>(OktaSDK.signInWithBrowser({ idp: '{idp}' })); | ||
|
||
expectType<Promise<Okta.AuthenticationResponse>>(OktaSDK.signInWithBrowser({ noSSO: true })); | ||
|
||
expectType<Promise<Okta.AuthenticationResponse>>(OktaSDK.authenticate('{sessionToken}')); | ||
|
||
expectType<Promise<{ resolve_type: string; }>>(OktaSDK.signOut()); | ||
|
||
expectType<Promise<{ id_token: string; }>>(OktaSDK.getIdToken()); | ||
|
||
expectType<Promise<{ access_token: string; }>>(OktaSDK.getAccessToken()); | ||
|
||
expectType<Promise<Okta.StringAnyMap>>(OktaSDK.getUser()); | ||
|
||
expectType<Promise<Okta.StringAnyMap>>(OktaSDK.getUserFromIdToken()); | ||
|
||
expectType<Promise<{ authenticated: boolean; }>>(OktaSDK.isAuthenticated()); | ||
|
||
expectType<Promise<boolean>>(OktaSDK.revokeAccessToken()); | ||
|
||
expectType<Promise<boolean>>(OktaSDK.revokeIdToken()); | ||
|
||
expectType<Promise<boolean>>(OktaSDK.revokeRefreshToken()); | ||
|
||
expectType<Promise<Okta.StringAnyMap>>(OktaSDK.introspectAccessToken()); | ||
|
||
expectType<Promise<Okta.StringAnyMap>>(OktaSDK.introspectIdToken()); | ||
|
||
expectType<Promise<Okta.StringAnyMap>>(OktaSDK.introspectRefreshToken()); | ||
|
||
expectType<Promise<Okta.RefreshResponse>>(OktaSDK.refreshTokens()); | ||
|
||
expectType<Promise<boolean>>(OktaSDK.clearTokens()); |
Oops, something went wrong.