Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@storyblok/app-extension-auth

Package Overview
Dependencies
Maintainers
0
Versions
22
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@storyblok/app-extension-auth - npm Package Compare versions

Comparing version 2.0.0-beta.1 to 2.0.0-beta.2

dist/session-adapters/createCookieAdapter.d.ts

2

dist/session-adapters/index.d.ts

@@ -1,3 +0,3 @@

export * from './cookieAdapter';
export * from './createCookieAdapter';
export * from './publicAdapter';
export * from './internalAdapter';

@@ -29,3 +29,3 @@ import http from 'http';

type CreateInternalAdapter = ({ params, req, res, adapter, }: {
params: Pick<AuthHandlerParams, 'clientId' | 'clientSecret' | 'sessionKey'>;
params: Pick<AuthHandlerParams, 'clientId' | 'clientSecret'>;
req: http.IncomingMessage;

@@ -32,0 +32,0 @@ res: http.ServerResponse;

import { IncomingMessage, ServerResponse } from 'node:http';
import { AppSession } from '../session';
export type MaybePromise<T> = T | Promise<T>;
export type Adapter = {
getItem: (params: {
req: IncomingMessage;
res: ServerResponse;
clientId: string;
spaceId: string;
userId: string;
key: string;
}) => MaybePromise<string | undefined>;
setItem: (params: {
req: IncomingMessage;
res: ServerResponse;
clientId: string;
spaceId: string;
userId: string;
key: string;
value: string;
}) => MaybePromise<boolean>;
removeItem: (params: {
req: IncomingMessage;
res: ServerResponse;
clientId: string;
spaceId: string;
userId: string;
key: string;
}) => MaybePromise<boolean>;
hasItem: (params: {
req: IncomingMessage;
res: ServerResponse;
clientId: string;
spaceId: string;
userId: string;
key: string;
}) => MaybePromise<boolean>;
getSession: GetSession;
setSession: SetSession;
removeSession: RemoveSession;
hasSession: HasSession;
};
type BaseSessionParams = {
req: IncomingMessage;
res: ServerResponse;
clientId: string;
spaceId: string;
userId: string;
};
type GetSession = (params: BaseSessionParams) => MaybePromise<AppSession | undefined>;
type SetSession = (params: BaseSessionParams & {
session: AppSession;
}) => MaybePromise<boolean>;
type RemoveSession = (params: BaseSessionParams) => MaybePromise<boolean>;
type HasSession = (params: BaseSessionParams) => MaybePromise<boolean>;
export {};
/**
* This object describes an HTTP response in a framework-agnostic way.
* The idea is to create one function that parses an incoming HTTP message into a `ResponseElement`.
* This `ResponseElement` is then fed into a _reconciler_ that writes the required changes into an HTTP response.
*/

@@ -6,0 +5,0 @@ export type ResponseElement = {

{
"name": "@storyblok/app-extension-auth",
"description": "A typed JavaScript library for handling authentication with Storyblok apps.",
"version": "2.0.0-beta.1",
"version": "2.0.0-beta.2",
"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

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc