mirror of
https://github.com/gosticks/DefinitelyTyped.git
synced 2026-08-12 04:50:18 +00:00
Update okta__okta-vue with changes in 1.1 (#35447)
* Update okta-vue config options, deps, version # * Clean up formatting
This commit is contained in:
Vendored
+10
-8
@@ -1,4 +1,4 @@
|
||||
// Type definitions for okta-vue 1.0
|
||||
// Type definitions for okta-vue 1.1
|
||||
// Project: https://github.com/okta/okta-oidc-js/tree/master/packages/okta-vue, https://github.com/okta/okta-oidc-js
|
||||
// Definitions by: Mike Dodge <https://github.com/innovation-team>
|
||||
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
|
||||
@@ -8,13 +8,15 @@ import { VueConstructor, PluginFunction } from 'vue';
|
||||
import { NavigationGuard } from 'vue-router';
|
||||
|
||||
declare namespace OktaVuePlugin {
|
||||
interface OktaVueOptions {
|
||||
issuer: string;
|
||||
client_id: string;
|
||||
redirect_uri: string;
|
||||
interface OktaVueOptions {
|
||||
issuer: string;
|
||||
client_id: string;
|
||||
redirect_uri: string;
|
||||
scope?: string;
|
||||
response_type?: string;
|
||||
}
|
||||
storage?: 'localStorage' | 'sessionStorage' | 'cookie';
|
||||
auto_renew?: boolean;
|
||||
}
|
||||
|
||||
interface OktaOpenIDOptions {
|
||||
sessionToken?: string;
|
||||
@@ -25,7 +27,7 @@ declare namespace OktaVuePlugin {
|
||||
nonce?: string;
|
||||
}
|
||||
|
||||
function install(vm: VueConstructor, options: OktaVueOptions): PluginFunction<VueConstructor>;
|
||||
function install(vm: VueConstructor, options: OktaVueOptions): PluginFunction<VueConstructor>;
|
||||
function handleCallback(): VueConstructor;
|
||||
}
|
||||
declare function OktaVuePlugin(): PluginFunction<VueConstructor>;
|
||||
@@ -42,7 +44,7 @@ declare module 'vue/types/vue' {
|
||||
getIdToken(): Promise<string>;
|
||||
getAccessToken(): Promise<string>;
|
||||
getUser(): Promise<any>;
|
||||
authRedirectGuardd(): Promise<NavigationGuard>;
|
||||
authRedirectGuard(): Promise<NavigationGuard>;
|
||||
};
|
||||
}
|
||||
}
|
||||
|
||||
@@ -3,10 +3,12 @@ import Router from 'vue-router';
|
||||
import Auth from 'okta__okta-vue';
|
||||
|
||||
Vue.use(Auth, {
|
||||
issuer: 'https://{yourOktaDomain}.com/oauth2/default',
|
||||
client_id: '{client_id}',
|
||||
redirect_uri: 'http://localhost:{port}/implicit/callback',
|
||||
scope: 'openid profile email'
|
||||
issuer: 'https://{yourOktaDomain}.com/oauth2/default',
|
||||
client_id: '{client_id}',
|
||||
redirect_uri: 'http://localhost:{port}/implicit/callback',
|
||||
scope: 'openid profile email',
|
||||
storage: 'cookie',
|
||||
auto_renew: false
|
||||
});
|
||||
|
||||
Vue.use(Router);
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
{
|
||||
"private": true,
|
||||
"dependencies": {
|
||||
"vue": "^2.5.9",
|
||||
"vue": "^2.5.17",
|
||||
"vue-router": "^3.0.1"
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user