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

@syncot/auth

Package Overview
Dependencies
Maintainers
1
Versions
26
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@syncot/auth - npm Package Compare versions

Comparing version 0.0.24 to 0.0.25

lib/auth.d.ts

8

CHANGELOG.md

@@ -6,2 +6,10 @@ # Change Log

## [0.0.25](https://github.com/SyncOT/SyncOT/compare/@syncot/auth@0.0.24...@syncot/auth@0.0.25) (2020-11-10)
**Note:** Version bump only for package @syncot/auth
## [0.0.24](https://github.com/SyncOT/SyncOT/compare/@syncot/auth@0.0.23...@syncot/auth@0.0.24) (2020-11-03)

@@ -8,0 +16,0 @@

71

lib/index.d.ts

@@ -1,70 +0,1 @@

import { EmitterInterface, SyncOtEmitter } from '@syncot/events';
import { Presence } from '@syncot/presence';
/**
* Events emitted by `AuthService` and `AuthClient`.
*/
export interface AuthEvents {
active: void;
inactive: void;
error: Error;
}
/**
* Manages authentication and authorization on the client side.
*
* @event active The AuthClient has an authenticated user.
* @event inactive The AuthClient no longer has an authenticated.
* @event error The AuthClient has experienced an error.
* @event destroy The AuthClient has been destroyed.
*/
export interface AuthClient extends EmitterInterface<SyncOtEmitter<AuthEvents>> {
/**
* If a user is authenticated, then `true`, otherwise `false`.
*/
readonly active: boolean;
/**
* If `active===true`, then a session ID, otherwise `undefined`.
*/
readonly sessionId: string | undefined;
/**
* If `active===true`, then the ID of the authenticated user, otherwise `undefined`.
*/
readonly userId: string | undefined;
}
/**
* Manages authentication and authorization on the server side.
*
* @event active The AuthService has an authenticated user.
* @event inactive The AuthService no longer has an authenticated user.
* @event error The AuthService has experienced an error.
* @event destroy The AuthService has been destroyed.
*/
export interface AuthService extends EmitterInterface<SyncOtEmitter<AuthEvents>> {
/**
* If a user is authenticated, then `true`, otherwise `false`.
*/
readonly active: boolean;
/**
* If `active===true`, then a session ID, otherwise `undefined`.
*/
readonly sessionId: string | undefined;
/**
* If `active===true`, then the ID of the authenticated user, otherwise `undefined`.
*/
readonly userId: string | undefined;
/**
* Determines if the user may read from the specified document.
*/
mayReadDocument(typeName: string, id: string): boolean | Promise<boolean>;
/**
* Determines if the user may write to the specified document.
*/
mayWriteDocument(typeName: string, id: string): boolean | Promise<boolean>;
/**
* Determines if the user may read/load the specified presence object.
*/
mayReadPresence(presence: Presence): boolean;
/**
* Determines if the user may write/store the specified presence object.
*/
mayWritePresence(presence: Presence): boolean;
}
export * from './auth';

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

export {};
export * from './auth';
{
"name": "@syncot/auth",
"version": "0.0.24",
"version": "0.0.25",
"description": "Interfaces and type definitions related to authentication and authorization.",

@@ -30,7 +30,7 @@ "keywords": [

"dependencies": {
"@syncot/events": "^0.1.2",
"@syncot/presence": "^0.0.22",
"@syncot/events": "^0.1.3",
"@syncot/presence": "^0.0.23",
"tslib": "^2.0.3"
},
"gitHead": "2399fa565e50dcfc2f4d37afd567c6cbcfdccb15"
"gitHead": "5ba3e377863fb1d00a2c1fb556ae6832f9950ada"
}
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