mirror of
https://github.com/gosticks/DefinitelyTyped.git
synced 2026-08-16 23:10:29 +00:00
Merge pull request #26211 from team-innovation/okta-vue
Update okta-vue
This commit is contained in:
Vendored
+12
-2
@@ -12,9 +12,19 @@ declare namespace OktaVuePlugin {
|
||||
issuer: string;
|
||||
client_id: string;
|
||||
redirect_uri: string;
|
||||
scope: string;
|
||||
scope?: string;
|
||||
response_type?: string;
|
||||
}
|
||||
|
||||
interface OktaOpenIDOptions {
|
||||
sessionToken?: string;
|
||||
responseMode?: string;
|
||||
responseType?: string | string[];
|
||||
scopes?: string[];
|
||||
state?: string;
|
||||
nonce?: string;
|
||||
}
|
||||
|
||||
function install(vm: VueConstructor, options: OktaVueOptions): PluginFunction<VueConstructor>;
|
||||
function handleCallback(): VueConstructor;
|
||||
}
|
||||
@@ -24,7 +34,7 @@ export default OktaVuePlugin;
|
||||
declare module 'vue/types/vue' {
|
||||
interface Vue {
|
||||
$auth: {
|
||||
loginRedirect(): void;
|
||||
loginRedirect(fromUri?: string, additionalParams?: OktaVuePlugin.OktaOpenIDOptions): void;
|
||||
logout(): Promise<void>;
|
||||
isAuthenticated(): Promise<boolean>;
|
||||
handleAuthentication(): Promise<void>;
|
||||
|
||||
@@ -46,5 +46,15 @@ const component = Vue.extend({
|
||||
redirect() {
|
||||
this.$auth.loginRedirect();
|
||||
},
|
||||
profileRedirect() {
|
||||
this.$auth.loginRedirect('/profile', {
|
||||
sessionToken: 'string',
|
||||
responseMode: 'string',
|
||||
responseType: 'string',
|
||||
scopes: ['string1', 'string2'],
|
||||
state: 'string',
|
||||
nonce: 'string',
|
||||
});
|
||||
},
|
||||
},
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user