@storyblok/app-extension-auth
Advanced tools
Comparing version 0.0.10-alpha to 0.0.11-alpha
import { RequestHandler } from './RequestHandler'; | ||
import { StoryblokScope } from './StoryblokScope'; | ||
export declare type AuthHandlerParams = { | ||
clientId: string; | ||
clientSecret: string; | ||
baseUrl: string; | ||
scope: StoryblokScope[]; | ||
cookieName?: string; | ||
successCallback?: string; | ||
errorCallback?: string; | ||
/** | ||
* Specifies the partial URL that is located between the baseUrl and the | ||
* authentication API endpoints. | ||
* | ||
* For example | ||
* - `baseUrl: "https://app.com"` | ||
* - `endpointPrefix: "api/authenticate"` | ||
* | ||
* will result in the endpoints | ||
* | ||
* - `https://my-app.my-domain.com/api/authenticate/storyblok` for initiating the authentication flow | ||
* - `https://my-app.my-domain.com/api/authenticate/storyblok/callback` as the OAuth2 callback URL | ||
*/ | ||
endpointPrefix: string | undefined; | ||
}; | ||
import { AuthHandlerParams } from './AuthHandlerParams'; | ||
export declare const authHandler: (params: AuthHandlerParams) => RequestHandler; |
import http from 'http'; | ||
import { AuthHandlerParams } from '../auth-handler'; | ||
import { AuthHandlerParams } from '../AuthHandlerParams'; | ||
export declare type GrantCallbackHandlerParams = Pick<AuthHandlerParams, 'successCallback' | 'errorCallback' | 'cookieName' | 'clientId' | 'clientSecret' | 'baseUrl' | 'endpointPrefix'>; | ||
export declare const authorizedHandler: (params: GrantCallbackHandlerParams) => (request: http.IncomingMessage, response: http.ServerResponse) => Promise<void>; |
import { RequestHandler } from '../RequestHandler'; | ||
import { AuthHandlerParams } from '../auth-handler'; | ||
import { AuthHandlerParams } from '../AuthHandlerParams'; | ||
export declare type GrantHandlerParams = Pick<AuthHandlerParams, 'successCallback' | 'errorCallback' | 'cookieName' | 'clientId' | 'clientSecret' | 'baseUrl' | 'endpointPrefix' | 'scope'>; | ||
@@ -4,0 +4,0 @@ export declare const grantCookieName = "grant"; |
@@ -1,2 +0,2 @@ | ||
import { StoryblokGrantResponse } from '../storyblok-grant-response'; | ||
import { StoryblokGrantResponse } from '../StoryblokGrantResponse'; | ||
export declare const isStoryblokGrantResponse: (obj: unknown) => obj is StoryblokGrantResponse; |
@@ -1,2 +0,2 @@ | ||
import { StoryblokGrantResponse } from '../storyblok-grant-response'; | ||
import { StoryblokGrantResponse } from '../StoryblokGrantResponse'; | ||
export declare type StoryblokGrantSession = { | ||
@@ -3,0 +3,0 @@ provider: 'storyblok'; |
@@ -6,1 +6,2 @@ export * from './user-info/UserInfo/user-info'; | ||
export { Role } from './user-info/Role/role'; | ||
export { AuthHandlerParams } from './AuthHandlerParams'; |
@@ -1,2 +0,2 @@ | ||
import { AuthHandlerParams } from './auth-handler'; | ||
import { AuthHandlerParams } from './AuthHandlerParams'; | ||
export declare type RefreshTokenWithFetchParams = Pick<AuthHandlerParams, 'clientId' | 'clientSecret' | 'baseUrl' | 'endpointPrefix'>; | ||
@@ -3,0 +3,0 @@ export declare type RefreshTokenResponse = { |
{ | ||
"name": "@storyblok/app-extension-auth", | ||
"description": "A typed JavaScript library for handling authentication with Storyblok apps.", | ||
"version": "0.0.10-alpha", | ||
"version": "0.0.11-alpha", | ||
"author": { | ||
@@ -6,0 +6,0 @@ "name": "Johannes Lindgren", |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
42794
4144571