piral-oauth2
Advanced tools
Comparing version 0.11.8 to 1.0.0-pre.1638
@@ -1,2 +0,2 @@ | ||
import { Extend } from 'piral-core'; | ||
import { PiralPlugin } from 'piral-core'; | ||
import { OAuth2Client } from './setup'; | ||
@@ -7,2 +7,2 @@ import { PiralOAuth2Api } from './types'; | ||
*/ | ||
export declare function createOAuth2Api(client: OAuth2Client): Extend<PiralOAuth2Api>; | ||
export declare function createOAuth2Api(client: OAuth2Client): PiralPlugin<PiralOAuth2Api>; |
{ | ||
"name": "piral-oauth2", | ||
"version": "0.11.8", | ||
"version": "1.0.0-pre.1638", | ||
"description": "Plugin to integrate OAuth 2.0 authentication in Piral.", | ||
@@ -45,8 +45,8 @@ "keywords": [ | ||
"devDependencies": { | ||
"piral-core": "^0.11.8" | ||
"piral-core": "^1.0.0-pre.1638" | ||
}, | ||
"peerDependencies": { | ||
"piral-core": "^0.9.0 || ^0.10.0 || ^0.11.0" | ||
"piral-core": "^1.0.0" | ||
}, | ||
"gitHead": "617df77a2d553e455ec66b04936967ff3ce21a47" | ||
"gitHead": "29ed426e3cbe4b59dbc4b9c7c4ddd071a3f8daf8" | ||
} |
@@ -59,3 +59,3 @@ [![Piral Logo](https://github.com/smapiot/piral/raw/master/docs/assets/logo.png)](https://piral.io) | ||
// important part | ||
extendApi: [createOAuth2Api(client)], | ||
plugins: [createOAuth2Api(client)], | ||
// ... | ||
@@ -82,3 +82,3 @@ }); | ||
// ... | ||
extendApi: [createOAuth2Api(client)], | ||
plugins: [createOAuth2Api(client)], | ||
}); | ||
@@ -85,0 +85,0 @@ } |
@@ -1,2 +0,2 @@ | ||
import { Extend } from 'piral-core'; | ||
import { PiralPlugin } from 'piral-core'; | ||
import { OAuth2Client } from './setup'; | ||
@@ -8,3 +8,3 @@ import { PiralOAuth2Api } from './types'; | ||
*/ | ||
export function createOAuth2Api(client: OAuth2Client): Extend<PiralOAuth2Api> { | ||
export function createOAuth2Api(client: OAuth2Client): PiralPlugin<PiralOAuth2Api> { | ||
return context => { | ||
@@ -11,0 +11,0 @@ context.on('before-fetch', client.extendHeaders); |
21015