@okta/okta-auth-js 7.1.0 → 7.2.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +36 -0
- package/README.md +93 -36
- package/cjs/core/mixin.js +3 -0
- package/cjs/core/mixin.js.map +1 -1
- package/cjs/core/types/api.js.map +1 -1
- package/cjs/http/OktaUserAgent.js +2 -2
- package/cjs/idx/IdxTransactionManager.js +0 -4
- package/cjs/idx/IdxTransactionManager.js.map +1 -1
- package/cjs/idx/factory/OktaAuthIdx.js.map +1 -1
- package/cjs/idx/idxState/v1/idxResponseParser.js +2 -3
- package/cjs/idx/idxState/v1/idxResponseParser.js.map +1 -1
- package/cjs/idx/mixin.js.map +1 -1
- package/cjs/idx/register.js +1 -7
- package/cjs/idx/register.js.map +1 -1
- package/cjs/idx/types/api.js.map +1 -1
- package/cjs/idx/types/idx-js.js.map +1 -1
- package/cjs/idx/types/index.js.map +1 -1
- package/cjs/idx/webauthn.js.map +1 -1
- package/cjs/myaccount/api.js +11 -0
- package/cjs/myaccount/api.js.map +1 -1
- package/cjs/myaccount/emailApi.js +7 -7
- package/cjs/myaccount/emailApi.js.map +1 -1
- package/cjs/myaccount/passwordApi.js +69 -0
- package/cjs/myaccount/passwordApi.js.map +1 -0
- package/cjs/myaccount/phoneApi.js +6 -6
- package/cjs/myaccount/phoneApi.js.map +1 -1
- package/cjs/myaccount/profileApi.js +3 -3
- package/cjs/myaccount/profileApi.js.map +1 -1
- package/cjs/myaccount/request.js +2 -1
- package/cjs/myaccount/request.js.map +1 -1
- package/cjs/myaccount/transactions/PasswordTransaction.js +81 -0
- package/cjs/myaccount/transactions/PasswordTransaction.js.map +1 -0
- package/cjs/myaccount/transactions/index.js +7 -0
- package/cjs/myaccount/transactions/index.js.map +1 -1
- package/cjs/myaccount/types.js +13 -0
- package/cjs/myaccount/types.js.map +1 -1
- package/cjs/oidc/TokenManager.js +5 -0
- package/cjs/oidc/TokenManager.js.map +1 -1
- package/cjs/oidc/endpoints/authorize.js +4 -3
- package/cjs/oidc/endpoints/authorize.js.map +1 -1
- package/cjs/oidc/enrollAuthenticator.js +33 -0
- package/cjs/oidc/enrollAuthenticator.js.map +1 -0
- package/cjs/oidc/factory/api.js +11 -11
- package/cjs/oidc/factory/api.js.map +1 -1
- package/cjs/oidc/getWithRedirect.js +5 -1
- package/cjs/oidc/getWithRedirect.js.map +1 -1
- package/cjs/oidc/handleOAuthResponse.js +3 -2
- package/cjs/oidc/handleOAuthResponse.js.map +1 -1
- package/cjs/oidc/mixin/index.js +6 -2
- package/cjs/oidc/mixin/index.js.map +1 -1
- package/cjs/oidc/types/TokenManager.js.map +1 -1
- package/cjs/oidc/types/api.js.map +1 -1
- package/cjs/oidc/types/endpoints.js +2 -0
- package/cjs/oidc/types/endpoints.js.map +1 -0
- package/cjs/oidc/types/index.js +11 -0
- package/cjs/oidc/types/index.js.map +1 -1
- package/cjs/oidc/types/meta.js.map +1 -1
- package/cjs/oidc/types/options.js.map +1 -1
- package/cjs/oidc/types/proto.js.map +1 -1
- package/cjs/oidc/util/defaultEnrollAuthenticatorParams.js +38 -0
- package/cjs/oidc/util/defaultEnrollAuthenticatorParams.js.map +1 -0
- package/cjs/oidc/util/enrollAuthenticatorMeta.js +23 -0
- package/cjs/oidc/util/enrollAuthenticatorMeta.js.map +1 -0
- package/cjs/oidc/util/index.js +36 -0
- package/cjs/oidc/util/index.js.map +1 -1
- package/cjs/oidc/util/prepareEnrollAuthenticatorParams.js +50 -0
- package/cjs/oidc/util/prepareEnrollAuthenticatorParams.js.map +1 -0
- package/cjs/services/AutoRenewService.js +15 -0
- package/cjs/services/AutoRenewService.js.map +1 -1
- package/cjs/util/jsonpath.js +13 -0
- package/cjs/util/jsonpath.js.map +1 -0
- package/dist/okta-auth-js.authn.min.analyzer.html +2 -2
- package/dist/okta-auth-js.authn.min.js +1 -1
- package/dist/okta-auth-js.authn.min.js.map +1 -1
- package/dist/okta-auth-js.core.min.analyzer.html +2 -2
- package/dist/okta-auth-js.core.min.js +1 -1
- package/dist/okta-auth-js.core.min.js.map +1 -1
- package/dist/okta-auth-js.idx.min.analyzer.html +2 -2
- package/dist/okta-auth-js.idx.min.js +1 -1
- package/dist/okta-auth-js.idx.min.js.map +1 -1
- package/dist/okta-auth-js.min.analyzer.html +2 -2
- package/dist/okta-auth-js.min.js +1 -1
- package/dist/okta-auth-js.min.js.map +1 -1
- package/dist/okta-auth-js.myaccount.min.analyzer.html +2 -2
- package/dist/okta-auth-js.myaccount.min.js +1 -1
- package/dist/okta-auth-js.myaccount.min.js.map +1 -1
- package/esm/browser/core/mixin.js +3 -0
- package/esm/browser/core/mixin.js.map +1 -1
- package/esm/browser/exports/exports/authn.js +4 -1
- package/esm/browser/exports/exports/authn.js.map +1 -1
- package/esm/browser/exports/exports/core.js +4 -1
- package/esm/browser/exports/exports/core.js.map +1 -1
- package/esm/browser/exports/exports/default.js +7 -2
- package/esm/browser/exports/exports/default.js.map +1 -1
- package/esm/browser/exports/exports/idx.js +4 -1
- package/esm/browser/exports/exports/idx.js.map +1 -1
- package/esm/browser/exports/exports/myaccount.js +7 -2
- package/esm/browser/exports/exports/myaccount.js.map +1 -1
- package/esm/browser/http/OktaUserAgent.js +2 -2
- package/esm/browser/idx/IdxTransactionManager.js +1 -4
- package/esm/browser/idx/IdxTransactionManager.js.map +1 -1
- package/esm/browser/idx/factory/OktaAuthIdx.js.map +1 -1
- package/esm/browser/idx/idxState/v1/idxResponseParser.js +2 -2
- package/esm/browser/idx/idxState/v1/idxResponseParser.js.map +1 -1
- package/esm/browser/idx/mixin.js.map +1 -1
- package/esm/browser/idx/register.js +1 -4
- package/esm/browser/idx/register.js.map +1 -1
- package/esm/browser/idx/types/api.js.map +1 -1
- package/esm/browser/idx/types/idx-js.js.map +1 -1
- package/esm/browser/idx/webauthn.js.map +1 -1
- package/esm/browser/myaccount/api.js +1 -0
- package/esm/browser/myaccount/api.js.map +1 -1
- package/esm/browser/myaccount/emailApi.js.map +1 -1
- package/esm/browser/myaccount/passwordApi.js +56 -0
- package/esm/browser/myaccount/passwordApi.js.map +1 -0
- package/esm/browser/myaccount/phoneApi.js.map +1 -1
- package/esm/browser/myaccount/profileApi.js.map +1 -1
- package/esm/browser/myaccount/request.js +3 -1
- package/esm/browser/myaccount/request.js.map +1 -1
- package/esm/browser/myaccount/transactions/PasswordTransaction.js +73 -0
- package/esm/browser/myaccount/transactions/PasswordTransaction.js.map +1 -0
- package/esm/browser/myaccount/types.js +6 -1
- package/esm/browser/myaccount/types.js.map +1 -1
- package/esm/browser/oidc/TokenManager.js +5 -0
- package/esm/browser/oidc/TokenManager.js.map +1 -1
- package/esm/browser/oidc/endpoints/authorize.js +3 -2
- package/esm/browser/oidc/endpoints/authorize.js.map +1 -1
- package/esm/browser/oidc/enrollAuthenticator.js +36 -0
- package/esm/browser/oidc/enrollAuthenticator.js.map +1 -0
- package/esm/browser/oidc/factory/api.js +10 -12
- package/esm/browser/oidc/factory/api.js.map +1 -1
- package/esm/browser/oidc/getWithRedirect.js +6 -1
- package/esm/browser/oidc/getWithRedirect.js.map +1 -1
- package/esm/browser/oidc/handleOAuthResponse.js +3 -2
- package/esm/browser/oidc/handleOAuthResponse.js.map +1 -1
- package/esm/browser/oidc/mixin/index.js +6 -3
- package/esm/browser/oidc/mixin/index.js.map +1 -1
- package/esm/browser/oidc/types/TokenManager.js.map +1 -1
- package/esm/browser/oidc/util/defaultEnrollAuthenticatorParams.js +31 -0
- package/esm/browser/oidc/util/defaultEnrollAuthenticatorParams.js.map +1 -0
- package/esm/browser/oidc/util/enrollAuthenticatorMeta.js +33 -0
- package/esm/browser/oidc/util/enrollAuthenticatorMeta.js.map +1 -0
- package/esm/browser/oidc/util/prepareEnrollAuthenticatorParams.js +34 -0
- package/esm/browser/oidc/util/prepareEnrollAuthenticatorParams.js.map +1 -0
- package/esm/browser/package.json +1 -1
- package/esm/browser/services/AutoRenewService.js +14 -0
- package/esm/browser/services/AutoRenewService.js.map +1 -1
- package/esm/browser/util/jsonpath.js +21 -0
- package/esm/browser/util/jsonpath.js.map +1 -0
- package/esm/node/core/mixin.js +3 -0
- package/esm/node/core/mixin.js.map +1 -1
- package/esm/node/exports/exports/authn.js +4 -1
- package/esm/node/exports/exports/authn.js.map +1 -1
- package/esm/node/exports/exports/core.js +4 -1
- package/esm/node/exports/exports/core.js.map +1 -1
- package/esm/node/exports/exports/default.js +7 -2
- package/esm/node/exports/exports/default.js.map +1 -1
- package/esm/node/exports/exports/idx.js +4 -1
- package/esm/node/exports/exports/idx.js.map +1 -1
- package/esm/node/exports/exports/myaccount.js +7 -2
- package/esm/node/exports/exports/myaccount.js.map +1 -1
- package/esm/node/http/OktaUserAgent.js +2 -2
- package/esm/node/idx/IdxTransactionManager.js +1 -4
- package/esm/node/idx/IdxTransactionManager.js.map +1 -1
- package/esm/node/idx/factory/OktaAuthIdx.js.map +1 -1
- package/esm/node/idx/idxState/v1/idxResponseParser.js +2 -2
- package/esm/node/idx/idxState/v1/idxResponseParser.js.map +1 -1
- package/esm/node/idx/mixin.js.map +1 -1
- package/esm/node/idx/register.js +1 -4
- package/esm/node/idx/register.js.map +1 -1
- package/esm/node/idx/types/api.js.map +1 -1
- package/esm/node/idx/types/idx-js.js.map +1 -1
- package/esm/node/idx/webauthn.js.map +1 -1
- package/esm/node/myaccount/api.js +1 -0
- package/esm/node/myaccount/api.js.map +1 -1
- package/esm/node/myaccount/emailApi.js.map +1 -1
- package/esm/node/myaccount/passwordApi.js +56 -0
- package/esm/node/myaccount/passwordApi.js.map +1 -0
- package/esm/node/myaccount/phoneApi.js.map +1 -1
- package/esm/node/myaccount/profileApi.js.map +1 -1
- package/esm/node/myaccount/request.js +3 -1
- package/esm/node/myaccount/request.js.map +1 -1
- package/esm/node/myaccount/transactions/PasswordTransaction.js +73 -0
- package/esm/node/myaccount/transactions/PasswordTransaction.js.map +1 -0
- package/esm/node/myaccount/types.js +6 -1
- package/esm/node/myaccount/types.js.map +1 -1
- package/esm/node/oidc/TokenManager.js +5 -0
- package/esm/node/oidc/TokenManager.js.map +1 -1
- package/esm/node/oidc/endpoints/authorize.js +3 -2
- package/esm/node/oidc/endpoints/authorize.js.map +1 -1
- package/esm/node/oidc/enrollAuthenticator.js +37 -0
- package/esm/node/oidc/enrollAuthenticator.js.map +1 -0
- package/esm/node/oidc/factory/api.js +10 -12
- package/esm/node/oidc/factory/api.js.map +1 -1
- package/esm/node/oidc/getWithRedirect.js +6 -1
- package/esm/node/oidc/getWithRedirect.js.map +1 -1
- package/esm/node/oidc/handleOAuthResponse.js +3 -2
- package/esm/node/oidc/handleOAuthResponse.js.map +1 -1
- package/esm/node/oidc/mixin/index.js +6 -3
- package/esm/node/oidc/mixin/index.js.map +1 -1
- package/esm/node/oidc/types/TokenManager.js.map +1 -1
- package/esm/node/oidc/util/defaultEnrollAuthenticatorParams.js +31 -0
- package/esm/node/oidc/util/defaultEnrollAuthenticatorParams.js.map +1 -0
- package/esm/node/oidc/util/enrollAuthenticatorMeta.js +33 -0
- package/esm/node/oidc/util/enrollAuthenticatorMeta.js.map +1 -0
- package/esm/node/oidc/util/prepareEnrollAuthenticatorParams.js +34 -0
- package/esm/node/oidc/util/prepareEnrollAuthenticatorParams.js.map +1 -0
- package/esm/node/package.json +1 -1
- package/esm/node/util/jsonpath.js +21 -0
- package/esm/node/util/jsonpath.js.map +1 -0
- package/package.json +5 -5
- package/types/lib/core/types/api.d.ts +1 -0
- package/types/lib/exports/default.d.ts +1 -1
- package/types/lib/exports/idx.d.ts +1 -1
- package/types/lib/idx/factory/OktaAuthIdx.d.ts +3 -3
- package/types/lib/idx/mixin.d.ts +2 -2
- package/types/lib/idx/types/api.d.ts +13 -1
- package/types/lib/idx/types/idx-js.d.ts +13 -0
- package/types/lib/idx/types/index.d.ts +1 -1
- package/types/lib/idx/webauthn.d.ts +1 -7
- package/types/lib/myaccount/api.d.ts +1 -0
- package/types/lib/myaccount/emailApi.d.ts +7 -7
- package/types/lib/myaccount/passwordApi.d.ts +17 -0
- package/types/lib/myaccount/phoneApi.d.ts +6 -6
- package/types/lib/myaccount/profileApi.d.ts +3 -3
- package/types/lib/myaccount/transactions/PasswordTransaction.d.ts +13 -0
- package/types/lib/myaccount/transactions/index.d.ts +1 -0
- package/types/lib/myaccount/types.d.ts +17 -2
- package/types/lib/oidc/TokenManager.d.ts +1 -0
- package/types/lib/oidc/enrollAuthenticator.d.ts +14 -0
- package/types/lib/oidc/factory/api.d.ts +2 -1
- package/types/lib/oidc/types/TokenManager.d.ts +1 -0
- package/types/lib/oidc/types/api.d.ts +5 -4
- package/types/lib/oidc/types/endpoints.d.ts +18 -0
- package/types/lib/oidc/types/index.d.ts +1 -0
- package/types/lib/oidc/types/meta.d.ts +1 -1
- package/types/lib/oidc/types/options.d.ts +6 -1
- package/types/lib/oidc/types/proto.d.ts +1 -0
- package/types/lib/oidc/util/defaultEnrollAuthenticatorParams.d.ts +2 -0
- package/types/lib/oidc/util/enrollAuthenticatorMeta.d.ts +2 -0
- package/types/lib/oidc/util/index.d.ts +3 -0
- package/types/lib/oidc/util/prepareEnrollAuthenticatorParams.d.ts +2 -0
- package/types/lib/services/AutoRenewService.d.ts +1 -0
- package/types/lib/util/jsonpath.d.ts +2 -0
- package/umd/authn.js +1 -1
- package/umd/authn.js.map +1 -1
- package/umd/core.js +1 -1
- package/umd/core.js.map +1 -1
- package/umd/default.js +1 -1
- package/umd/default.js.map +1 -1
- package/umd/idx.js +1 -1
- package/umd/idx.js.map +1 -1
- package/umd/myaccount.js +1 -1
- package/umd/myaccount.js.map +1 -1
|
@@ -82,6 +82,7 @@ export interface IdxAuthenticator {
|
|
|
82
82
|
resend?: Record<string, unknown>;
|
|
83
83
|
poll?: Record<string, unknown>;
|
|
84
84
|
recover?: Record<string, unknown>;
|
|
85
|
+
deviceKnown?: boolean;
|
|
85
86
|
}
|
|
86
87
|
export interface IdxForm {
|
|
87
88
|
value: IdxRemediationValue[];
|
|
@@ -146,6 +147,10 @@ export interface IdxContext {
|
|
|
146
147
|
type: string;
|
|
147
148
|
value: IdxAuthenticator;
|
|
148
149
|
};
|
|
150
|
+
currentAuthenticatorEnrollment: {
|
|
151
|
+
type: string;
|
|
152
|
+
value: IdxAuthenticator;
|
|
153
|
+
};
|
|
149
154
|
authenticators: {
|
|
150
155
|
type: string;
|
|
151
156
|
value: IdxAuthenticator[];
|
|
@@ -162,6 +167,7 @@ export interface IdxContext {
|
|
|
162
167
|
type: string;
|
|
163
168
|
value: Record<string, unknown>;
|
|
164
169
|
};
|
|
170
|
+
uiDisplay?: IdxContextUIDisplay;
|
|
165
171
|
app: {
|
|
166
172
|
type: string;
|
|
167
173
|
value: Record<string, unknown>;
|
|
@@ -170,6 +176,13 @@ export interface IdxContext {
|
|
|
170
176
|
success?: IdxRemediation;
|
|
171
177
|
failure?: IdxRemediation;
|
|
172
178
|
}
|
|
179
|
+
export interface IdxContextUIDisplay {
|
|
180
|
+
type: string;
|
|
181
|
+
value: {
|
|
182
|
+
label?: string;
|
|
183
|
+
buttonLabel?: string;
|
|
184
|
+
};
|
|
185
|
+
}
|
|
173
186
|
export interface IdxMessage {
|
|
174
187
|
message: string;
|
|
175
188
|
class: string;
|
|
@@ -11,7 +11,7 @@
|
|
|
11
11
|
*/
|
|
12
12
|
export * from './api';
|
|
13
13
|
export * from './options';
|
|
14
|
-
export type { IdxMessage, IdxMessages, ChallengeData, ActivationData, IdxResponse, IdxContext, RawIdxResponse, IdxRemediation, IdxAuthenticator, IdxActionParams, } from './idx-js';
|
|
14
|
+
export type { IdxMessage, IdxMessages, ChallengeData, ActivationData, IdxResponse, IdxContext, RawIdxResponse, IdxRemediation, IdxAuthenticator, IdxActionParams, IdxContextUIDisplay, } from './idx-js';
|
|
15
15
|
export * from './meta';
|
|
16
16
|
export type { FlowIdentifier } from './FlowIdentifier';
|
|
17
17
|
export type { WebauthnEnrollValues } from '../authenticator/WebauthnEnrollment';
|
|
@@ -9,13 +9,7 @@
|
|
|
9
9
|
*
|
|
10
10
|
* See the License for the specific language governing permissions and limitations under the License.
|
|
11
11
|
*/
|
|
12
|
-
import { ActivationData, ChallengeData, IdxAuthenticator
|
|
13
|
-
export interface WebauthnAPI {
|
|
14
|
-
getAssertion(credential: PublicKeyCredential): WebauthnVerificationValues;
|
|
15
|
-
getAttestation(credential: PublicKeyCredential): WebauthnEnrollValues;
|
|
16
|
-
buildCredentialRequestOptions(challengeData: ChallengeData, authenticatorEnrollments: IdxAuthenticator[]): CredentialRequestOptions;
|
|
17
|
-
buildCredentialCreationOptions(activationData: ActivationData, authenticatorEnrollments: IdxAuthenticator[]): CredentialCreationOptions;
|
|
18
|
-
}
|
|
12
|
+
import { ActivationData, ChallengeData, IdxAuthenticator } from './types';
|
|
19
13
|
export declare const buildCredentialCreationOptions: (activationData: ActivationData, authenticatorEnrollments: IdxAuthenticator[]) => CredentialCreationOptions;
|
|
20
14
|
export declare const buildCredentialRequestOptions: (challengeData: ChallengeData, authenticatorEnrollments: IdxAuthenticator[]) => CredentialRequestOptions;
|
|
21
15
|
export declare const getAttestation: (credential: PublicKeyCredential) => {
|
|
@@ -1,29 +1,29 @@
|
|
|
1
1
|
import { IAPIFunction, BaseTransaction, EmailTransaction, EmailChallengeTransaction } from './types';
|
|
2
2
|
/**
|
|
3
|
-
* @scope: okta.
|
|
3
|
+
* @scope: okta.myAccount.email.read
|
|
4
4
|
*/
|
|
5
5
|
export declare const getEmails: IAPIFunction<EmailTransaction[]>;
|
|
6
6
|
/**
|
|
7
|
-
* @scope: okta.
|
|
7
|
+
* @scope: okta.myAccount.email.read
|
|
8
8
|
*/
|
|
9
9
|
export declare const getEmail: IAPIFunction<EmailTransaction>;
|
|
10
10
|
/**
|
|
11
|
-
* @scope: okta.
|
|
11
|
+
* @scope: okta.myAccount.email.manage
|
|
12
12
|
*/
|
|
13
13
|
export declare const addEmail: IAPIFunction<EmailTransaction>;
|
|
14
14
|
/**
|
|
15
|
-
* @scope: okta.
|
|
15
|
+
* @scope: okta.myAccount.email.manage
|
|
16
16
|
*/
|
|
17
17
|
export declare const deleteEmail: IAPIFunction<BaseTransaction>;
|
|
18
18
|
/**
|
|
19
|
-
* @scope: okta.
|
|
19
|
+
* @scope: okta.myAccount.email.read
|
|
20
20
|
*/
|
|
21
21
|
export declare const sendEmailChallenge: IAPIFunction<EmailChallengeTransaction>;
|
|
22
22
|
/**
|
|
23
|
-
* @scope: okta.
|
|
23
|
+
* @scope: okta.myAccount.email.read
|
|
24
24
|
*/
|
|
25
25
|
export declare const getEmailChallenge: IAPIFunction<EmailChallengeTransaction>;
|
|
26
26
|
/**
|
|
27
|
-
* @scope: okta.
|
|
27
|
+
* @scope: okta.myAccount.email.manage
|
|
28
28
|
*/
|
|
29
29
|
export declare const verifyEmailChallenge: IAPIFunction<BaseTransaction>;
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { IAPIFunction, BaseTransaction, PasswordTransaction } from './types';
|
|
2
|
+
/**
|
|
3
|
+
* @scope: okta.myAccount.password.read
|
|
4
|
+
*/
|
|
5
|
+
export declare const getPassword: IAPIFunction<PasswordTransaction>;
|
|
6
|
+
/**
|
|
7
|
+
* @scope: okta.myAccount.password.manage
|
|
8
|
+
*/
|
|
9
|
+
export declare const enrollPassword: IAPIFunction<PasswordTransaction>;
|
|
10
|
+
/**
|
|
11
|
+
* @scope: okta.myAccount.password.manage
|
|
12
|
+
*/
|
|
13
|
+
export declare const updatePassword: IAPIFunction<PasswordTransaction>;
|
|
14
|
+
/**
|
|
15
|
+
* @scope: okta.myAccount.password.manage
|
|
16
|
+
*/
|
|
17
|
+
export declare const deletePassword: IAPIFunction<BaseTransaction>;
|
|
@@ -1,25 +1,25 @@
|
|
|
1
1
|
import { IAPIFunction, BaseTransaction, PhoneTransaction } from './types';
|
|
2
2
|
/**
|
|
3
|
-
* @scope: okta.
|
|
3
|
+
* @scope: okta.myAccount.phone.read
|
|
4
4
|
*/
|
|
5
5
|
export declare const getPhones: IAPIFunction<PhoneTransaction[]>;
|
|
6
6
|
/**
|
|
7
|
-
* @scope: okta.
|
|
7
|
+
* @scope: okta.myAccount.phone.read
|
|
8
8
|
*/
|
|
9
9
|
export declare const getPhone: IAPIFunction<PhoneTransaction>;
|
|
10
10
|
/**
|
|
11
|
-
* @scope: okta.
|
|
11
|
+
* @scope: okta.myAccount.phone.manage
|
|
12
12
|
*/
|
|
13
13
|
export declare const addPhone: IAPIFunction<PhoneTransaction>;
|
|
14
14
|
/**
|
|
15
|
-
* @scope: okta.
|
|
15
|
+
* @scope: okta.myAccount.phone.manage
|
|
16
16
|
*/
|
|
17
17
|
export declare const deletePhone: IAPIFunction<BaseTransaction>;
|
|
18
18
|
/**
|
|
19
|
-
* @scope: okta.
|
|
19
|
+
* @scope: okta.myAccount.phone.manage
|
|
20
20
|
*/
|
|
21
21
|
export declare const sendPhoneChallenge: IAPIFunction<BaseTransaction>;
|
|
22
22
|
/**
|
|
23
|
-
* @scope: okta.
|
|
23
|
+
* @scope: okta.myAccount.phone.manage
|
|
24
24
|
*/
|
|
25
25
|
export declare const verifyPhoneChallenge: IAPIFunction<BaseTransaction>;
|
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
import { IAPIFunction, ProfileTransaction, ProfileSchemaTransaction } from './types';
|
|
2
2
|
/**
|
|
3
|
-
* @scope: okta.
|
|
3
|
+
* @scope: okta.myAccount.profile.read
|
|
4
4
|
*/
|
|
5
5
|
export declare const getProfile: IAPIFunction<ProfileTransaction>;
|
|
6
6
|
/**
|
|
7
|
-
* @scope: okta.
|
|
7
|
+
* @scope: okta.myAccount.profile.manage
|
|
8
8
|
*/
|
|
9
9
|
export declare const updateProfile: IAPIFunction<ProfileTransaction>;
|
|
10
10
|
/**
|
|
11
|
-
* @scope: okta.
|
|
11
|
+
* @scope: okta.myAccount.profile.read
|
|
12
12
|
*/
|
|
13
13
|
export declare const getProfileSchema: IAPIFunction<ProfileSchemaTransaction>;
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { EnrollPasswordPayload, UpdatePasswordPayload, PasswordStatus } from '../types';
|
|
2
|
+
import BaseTransaction from './Base';
|
|
3
|
+
export default class PasswordTransaction extends BaseTransaction {
|
|
4
|
+
id: string;
|
|
5
|
+
created: string;
|
|
6
|
+
lastUpdated: string;
|
|
7
|
+
status: PasswordStatus;
|
|
8
|
+
get?: () => Promise<PasswordTransaction>;
|
|
9
|
+
enroll?: (payload: EnrollPasswordPayload) => Promise<PasswordTransaction>;
|
|
10
|
+
update?: (payload: UpdatePasswordPayload) => Promise<PasswordTransaction>;
|
|
11
|
+
delete?: () => Promise<BaseTransaction>;
|
|
12
|
+
constructor(oktaAuth: any, options: any);
|
|
13
|
+
}
|
|
@@ -4,4 +4,5 @@ export { default as EmailTransaction } from './EmailTransaction';
|
|
|
4
4
|
export { default as EmailStatusTransaction } from './EmailStatusTransaction';
|
|
5
5
|
export { default as EmailChallengeTransaction } from './EmailChallengeTransaction';
|
|
6
6
|
export { default as PhoneTransaction } from './PhoneTransaction';
|
|
7
|
+
export { default as PasswordTransaction } from './PasswordTransaction';
|
|
7
8
|
export { default as BaseTransaction } from './Base';
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { OAuthStorageManagerInterface, OAuthTransactionMeta, OktaAuthOAuthInterface, OktaAuthOAuthOptions, PKCETransactionMeta } from '../oidc/types';
|
|
2
|
-
export { EmailTransaction, EmailStatusTransaction, EmailChallengeTransaction, PhoneTransaction, ProfileTransaction, ProfileSchemaTransaction, BaseTransaction } from './transactions';
|
|
2
|
+
export { EmailTransaction, EmailStatusTransaction, EmailChallengeTransaction, PhoneTransaction, ProfileTransaction, ProfileSchemaTransaction, PasswordTransaction, BaseTransaction } from './transactions';
|
|
3
3
|
export declare enum EmailRole {
|
|
4
4
|
PRIMARY = "PRIMARY",
|
|
5
5
|
SECONDARY = "SECONDARY"
|
|
@@ -8,6 +8,10 @@ export declare enum Status {
|
|
|
8
8
|
VERIFIED = "VERIFIED",
|
|
9
9
|
UNVERIFIED = "UNVERIFIED"
|
|
10
10
|
}
|
|
11
|
+
export declare enum PasswordStatus {
|
|
12
|
+
NOT_ENROLLED = "NOT_ENROLLED",
|
|
13
|
+
ACTIVE = "ACTIVE"
|
|
14
|
+
}
|
|
11
15
|
export declare type EmailProfile = {
|
|
12
16
|
email: string;
|
|
13
17
|
};
|
|
@@ -36,6 +40,17 @@ export declare type ChallengePhonePayload = {
|
|
|
36
40
|
export declare type VerificationPayload = {
|
|
37
41
|
verificationCode: string;
|
|
38
42
|
};
|
|
43
|
+
export declare type EnrollPasswordPayload = {
|
|
44
|
+
profile: {
|
|
45
|
+
password: string;
|
|
46
|
+
};
|
|
47
|
+
};
|
|
48
|
+
export declare type UpdatePasswordPayload = {
|
|
49
|
+
profile: {
|
|
50
|
+
password: string;
|
|
51
|
+
currentPassword?: string;
|
|
52
|
+
};
|
|
53
|
+
};
|
|
39
54
|
export declare type UpdateProfilePayload = {
|
|
40
55
|
profile: {
|
|
41
56
|
firstName?: string;
|
|
@@ -49,7 +64,7 @@ export declare type MyAccountRequestOptions = {
|
|
|
49
64
|
id?: string;
|
|
50
65
|
emailId?: string;
|
|
51
66
|
challengeId?: string;
|
|
52
|
-
payload?: AddEmailPayload | AddPhonePayload | ChallengePhonePayload | VerificationPayload | UpdateProfilePayload;
|
|
67
|
+
payload?: AddEmailPayload | AddPhonePayload | ChallengePhonePayload | VerificationPayload | UpdateProfilePayload | EnrollPasswordPayload | UpdatePasswordPayload;
|
|
53
68
|
accessToken?: string;
|
|
54
69
|
};
|
|
55
70
|
export declare type IAPIFunction<T> = (oktaAuth: OktaAuthOAuthInterface, options?: MyAccountRequestOptions) => Promise<T>;
|
|
@@ -18,6 +18,7 @@ export declare class TokenManager implements TokenManagerInterface {
|
|
|
18
18
|
constructor(sdk: OktaAuthOAuthInterface, options?: TokenManagerOptions);
|
|
19
19
|
start(): void;
|
|
20
20
|
stop(): void;
|
|
21
|
+
isStarted(): boolean;
|
|
21
22
|
getOptions(): TokenManagerOptions;
|
|
22
23
|
getExpireTime(token: any): number;
|
|
23
24
|
hasExpired(token: any): boolean;
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
/*!
|
|
2
|
+
* Copyright (c) 2015-present, Okta, Inc. and/or its affiliates. All rights reserved.
|
|
3
|
+
* The Okta software accompanied by this notice is provided pursuant to the Apache License, Version 2.0 (the "License.")
|
|
4
|
+
*
|
|
5
|
+
* You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0.
|
|
6
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
7
|
+
* distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
|
|
8
|
+
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
9
|
+
*
|
|
10
|
+
* See the License for the specific language governing permissions and limitations under the License.
|
|
11
|
+
*
|
|
12
|
+
*/
|
|
13
|
+
import { OktaAuthOAuthInterface, EnrollAuthenticatorOptions } from './types';
|
|
14
|
+
export declare function enrollAuthenticator(sdk: OktaAuthOAuthInterface, options: EnrollAuthenticatorOptions): void;
|
|
@@ -11,5 +11,6 @@
|
|
|
11
11
|
*
|
|
12
12
|
*/
|
|
13
13
|
import { PromiseQueue } from '../../util';
|
|
14
|
-
import { OktaAuthOAuthInterface, TokenAPI } from '../types';
|
|
14
|
+
import { OktaAuthOAuthInterface, TokenAPI, Endpoints } from '../types';
|
|
15
15
|
export declare function createTokenAPI(sdk: OktaAuthOAuthInterface, queue: PromiseQueue): TokenAPI;
|
|
16
|
+
export declare function createEndpoints(sdk: OktaAuthOAuthInterface): Endpoints;
|
|
@@ -12,12 +12,14 @@
|
|
|
12
12
|
import { JWTObject } from './JWT';
|
|
13
13
|
import { OAuthTransactionMeta, PKCETransactionMeta } from './meta';
|
|
14
14
|
import { CustomUrls, OktaAuthOAuthOptions, SigninWithRedirectOptions, TokenParams } from './options';
|
|
15
|
+
import { OAuthResponseType } from './proto';
|
|
15
16
|
import { OAuthStorageManagerInterface } from './storage';
|
|
16
17
|
import { AccessToken, IDToken, RefreshToken, RevocableToken, Token, Tokens } from './Token';
|
|
17
18
|
import { TokenManagerInterface } from './TokenManager';
|
|
18
19
|
import { CustomUserClaims, UserClaims } from './UserClaims';
|
|
19
20
|
import { TransactionManagerInterface } from './TransactionManager';
|
|
20
21
|
import { OktaAuthSessionInterface } from '../../session/types';
|
|
22
|
+
import { Endpoints } from './endpoints';
|
|
21
23
|
export interface PopupParams {
|
|
22
24
|
popupTitle?: string;
|
|
23
25
|
popupWindow?: Window;
|
|
@@ -26,6 +28,7 @@ export interface TokenResponse {
|
|
|
26
28
|
tokens: Tokens;
|
|
27
29
|
state: string;
|
|
28
30
|
code?: string;
|
|
31
|
+
responseType?: OAuthResponseType | OAuthResponseType[] | 'none';
|
|
29
32
|
}
|
|
30
33
|
export interface ParseFromUrlOptions {
|
|
31
34
|
url?: string;
|
|
@@ -39,9 +42,6 @@ export interface ParseFromUrlInterface extends ParseFromUrlFunction {
|
|
|
39
42
|
}
|
|
40
43
|
export declare type GetWithRedirectFunction = (params?: TokenParams) => Promise<void>;
|
|
41
44
|
export declare type SetLocationFunction = (loc: string) => void;
|
|
42
|
-
export interface GetWithRedirectAPI extends GetWithRedirectFunction {
|
|
43
|
-
_setLocation: SetLocationFunction;
|
|
44
|
-
}
|
|
45
45
|
export interface BaseTokenAPI {
|
|
46
46
|
decode(token: string): JWTObject;
|
|
47
47
|
prepareTokenParams(params?: TokenParams): Promise<TokenParams>;
|
|
@@ -49,7 +49,7 @@ export interface BaseTokenAPI {
|
|
|
49
49
|
}
|
|
50
50
|
export interface TokenAPI extends BaseTokenAPI {
|
|
51
51
|
getUserInfo<S extends CustomUserClaims = CustomUserClaims>(accessToken?: AccessToken, idToken?: IDToken): Promise<UserClaims<S>>;
|
|
52
|
-
getWithRedirect:
|
|
52
|
+
getWithRedirect: GetWithRedirectFunction;
|
|
53
53
|
parseFromUrl: ParseFromUrlInterface;
|
|
54
54
|
getWithoutPrompt(params?: TokenParams): Promise<TokenResponse>;
|
|
55
55
|
getWithPopup(params?: TokenParams): Promise<TokenResponse>;
|
|
@@ -103,6 +103,7 @@ export interface OktaAuthOAuthInterface<M extends OAuthTransactionMeta = PKCETra
|
|
|
103
103
|
tokenManager: TokenManagerInterface;
|
|
104
104
|
pkce: PkceAPI;
|
|
105
105
|
transactionManager: TM;
|
|
106
|
+
endpoints: Endpoints;
|
|
106
107
|
isPKCE(): boolean;
|
|
107
108
|
getIdToken(): string | undefined;
|
|
108
109
|
getAccessToken(): string | undefined;
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
/*!
|
|
2
|
+
* Copyright (c) 2021-present, Okta, Inc. and/or its affiliates. All rights reserved.
|
|
3
|
+
* The Okta software accompanied by this notice is provided pursuant to the Apache License, Version 2.0 (the "License.")
|
|
4
|
+
*
|
|
5
|
+
* You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0.
|
|
6
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
7
|
+
* distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
|
|
8
|
+
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
9
|
+
*
|
|
10
|
+
* See the License for the specific language governing permissions and limitations under the License.
|
|
11
|
+
*/
|
|
12
|
+
import { EnrollAuthenticatorOptions } from './options';
|
|
13
|
+
export declare type EnrollAuthenticatorFunction = (params: EnrollAuthenticatorOptions) => void;
|
|
14
|
+
export interface Endpoints {
|
|
15
|
+
authorize: {
|
|
16
|
+
enrollAuthenticator: EnrollAuthenticatorFunction;
|
|
17
|
+
};
|
|
18
|
+
}
|
|
@@ -10,7 +10,7 @@
|
|
|
10
10
|
* See the License for the specific language governing permissions and limitations under the License.
|
|
11
11
|
*/
|
|
12
12
|
import { CustomUrls, TokenParams } from './options';
|
|
13
|
-
export interface OAuthTransactionMeta extends Pick<TokenParams, 'issuer' | 'clientId' | 'redirectUri' | 'responseType' | 'responseMode' | 'scopes' | 'state' | 'pkce' | 'ignoreSignature' | 'nonce' | 'acrValues'> {
|
|
13
|
+
export interface OAuthTransactionMeta extends Pick<TokenParams, 'issuer' | 'clientId' | 'redirectUri' | 'responseType' | 'responseMode' | 'scopes' | 'state' | 'pkce' | 'ignoreSignature' | 'nonce' | 'acrValues' | 'enrollAmrValues'> {
|
|
14
14
|
urls: CustomUrls;
|
|
15
15
|
originalUri?: string;
|
|
16
16
|
}
|
|
@@ -27,11 +27,12 @@ export interface TokenParams extends CustomUrls {
|
|
|
27
27
|
pkce?: boolean;
|
|
28
28
|
clientId?: string;
|
|
29
29
|
redirectUri?: string;
|
|
30
|
-
responseType?: OAuthResponseType | OAuthResponseType[];
|
|
30
|
+
responseType?: OAuthResponseType | OAuthResponseType[] | 'none';
|
|
31
31
|
responseMode?: OAuthResponseMode;
|
|
32
32
|
state?: string;
|
|
33
33
|
nonce?: string;
|
|
34
34
|
scopes?: string[];
|
|
35
|
+
enrollAmrValues?: string | string[];
|
|
35
36
|
display?: string;
|
|
36
37
|
ignoreSignature?: boolean;
|
|
37
38
|
codeVerifier?: string;
|
|
@@ -62,6 +63,10 @@ export interface TokenManagerOptions {
|
|
|
62
63
|
expireEarlySeconds?: number;
|
|
63
64
|
syncStorage?: boolean;
|
|
64
65
|
}
|
|
66
|
+
export interface EnrollAuthenticatorOptions extends TokenParams {
|
|
67
|
+
enrollAmrValues: string | string[];
|
|
68
|
+
acrValues: string;
|
|
69
|
+
}
|
|
65
70
|
export interface SigninWithRedirectOptions extends TokenParams {
|
|
66
71
|
originalUri?: string;
|
|
67
72
|
}
|
|
@@ -12,13 +12,16 @@
|
|
|
12
12
|
*/
|
|
13
13
|
export * from './browser';
|
|
14
14
|
export * from './defaultTokenParams';
|
|
15
|
+
export * from './defaultEnrollAuthenticatorParams';
|
|
15
16
|
export * from './errors';
|
|
16
17
|
export * from './loginRedirect';
|
|
17
18
|
export * from './oauth';
|
|
18
19
|
export * from './oauthMeta';
|
|
20
|
+
export * from './enrollAuthenticatorMeta';
|
|
19
21
|
import pkce from './pkce';
|
|
20
22
|
export { pkce };
|
|
21
23
|
export * from './prepareTokenParams';
|
|
24
|
+
export * from './prepareEnrollAuthenticatorParams';
|
|
22
25
|
export * from './refreshToken';
|
|
23
26
|
export * from './urlParams';
|
|
24
27
|
export * from './validateClaims';
|
|
@@ -19,6 +19,7 @@ export declare class AutoRenewService implements ServiceInterface {
|
|
|
19
19
|
constructor(tokenManager: TokenManagerInterface, options?: ServiceManagerOptions);
|
|
20
20
|
private shouldThrottleRenew;
|
|
21
21
|
requiresLeadership(): boolean;
|
|
22
|
+
private processExpiredTokens;
|
|
22
23
|
private onTokenExpiredHandler;
|
|
23
24
|
canStart(): boolean;
|
|
24
25
|
start(): Promise<void>;
|