feathers-authentication
Advanced tools
Comparing version 1.1.0 to 1.1.1
@@ -0,1 +1,3 @@ | ||
// TODO: don't have the defs from the hooks PR yet, fix later | ||
type Hook = (hookProps: any) => (Promise<any> | void); | ||
@@ -8,13 +10,13 @@ declare function auth (config?: auth.Options): () => void; | ||
interface Options { | ||
path: '/authentication'; | ||
header: 'Authorization'; | ||
entity: 'user'; | ||
service: 'users'; | ||
passReqToCallback: true; | ||
session: false; | ||
path: string; | ||
header: string; | ||
entity: string; | ||
service: string; | ||
passReqToCallback: boolean; | ||
session: boolean; | ||
cookie: { | ||
enabled: false; | ||
name: 'feathers-jwt'; | ||
httpOnly: false; | ||
secure: true; | ||
enabled: boolean; | ||
name: string; | ||
httpOnly: boolean; | ||
secure: boolean; | ||
}; | ||
@@ -25,3 +27,3 @@ jwt: { | ||
*/ | ||
header: { typ: 'access' }; | ||
header: Object; | ||
@@ -31,3 +33,3 @@ /** | ||
*/ | ||
audience: 'https://yourdomain.com'; | ||
audience: string; | ||
@@ -37,3 +39,3 @@ /** | ||
*/ | ||
subject: 'anonymous'; | ||
subject: string; | ||
@@ -43,5 +45,5 @@ /** | ||
*/ | ||
issuer: 'feathers'; | ||
algorithm: 'HS256'; | ||
expiresIn: '1d' | ||
issuer: string; | ||
algorithm: string; | ||
expiresIn: string; | ||
} | ||
@@ -55,2 +57,3 @@ } | ||
interface DefaultHooks { | ||
authenticate(strategies: string[]): Hook; | ||
/** | ||
@@ -64,3 +67,3 @@ * The `verifyToken` hook will attempt to verify a token. | ||
*/ | ||
verifyToken(options?): Function; | ||
verifyToken(options?): Hook; | ||
/** | ||
@@ -73,3 +76,3 @@ * The populateUser hook is for populating a user based on an id. | ||
*/ | ||
populateUser(options?): Function; | ||
populateUser(options?): Hook; | ||
@@ -83,3 +86,3 @@ /** | ||
*/ | ||
restrictToAuthenticated(): Function; | ||
restrictToAuthenticated(): Hook; | ||
/** | ||
@@ -94,3 +97,3 @@ * `restrictToOwner` is meant to be used as a before hook. | ||
*/ | ||
restrictToOwner(options?: RestrictOptions): Function; | ||
restrictToOwner(options?: RestrictOptions): Hook; | ||
@@ -104,3 +107,3 @@ /** | ||
*/ | ||
hashPassword(options?: HashPassOptions): Function; | ||
hashPassword(options?: HashPassOptions): Hook; | ||
} | ||
@@ -107,0 +110,0 @@ |
{ | ||
"name": "feathers-authentication", | ||
"description": "Add Authentication to your FeathersJS app.", | ||
"version": "1.1.0", | ||
"version": "1.1.1", | ||
"homepage": "https://github.com/feathersjs/feathers-authentication", | ||
@@ -6,0 +6,0 @@ "main": "lib/", |
120569
1154