@furystack/http-api
Advanced tools
Comparing version 5.3.18 to 5.3.19
import { RequestAction } from '../models/request-action'; | ||
/** | ||
* Action that returns the current authenticated user | ||
* | ||
* @param injector The injector from the current stack | ||
*/ | ||
export declare const GetCurrentUser: RequestAction; | ||
//# sourceMappingURL=get-current-user.d.ts.map |
@@ -7,2 +7,4 @@ "use strict"; | ||
* Action that returns the current authenticated user | ||
* | ||
* @param injector The injector from the current stack | ||
*/ | ||
@@ -9,0 +11,0 @@ exports.GetCurrentUser = async (injector) => { |
import { RequestAction } from '../models/request-action'; | ||
/** | ||
* Action that returns if the current user is authenticated | ||
* | ||
* @param injector The injector from the current stack | ||
*/ | ||
export declare const IsAuthenticated: RequestAction; | ||
//# sourceMappingURL=is-authenticated.d.ts.map |
@@ -7,2 +7,4 @@ "use strict"; | ||
* Action that returns if the current user is authenticated | ||
* | ||
* @param injector The injector from the current stack | ||
*/ | ||
@@ -9,0 +11,0 @@ exports.IsAuthenticated = async (injector) => { |
import { RequestAction } from '../models/request-action'; | ||
/** | ||
* Action that logs out the current user | ||
* | ||
* @param injector The injector from the current stack | ||
*/ | ||
export declare const LogoutAction: RequestAction; | ||
//# sourceMappingURL=logout.d.ts.map |
@@ -7,2 +7,4 @@ "use strict"; | ||
* Action that logs out the current user | ||
* | ||
* @param injector The injector from the current stack | ||
*/ | ||
@@ -9,0 +11,0 @@ exports.LogoutAction = async (injector) => { |
import { RequestAction } from '../models/request-action'; | ||
/** | ||
* Default fall back "Not Found" (404) action | ||
* | ||
* @param injector The injector from the current stack | ||
*/ | ||
export declare const NotFoundAction: RequestAction; | ||
//# sourceMappingURL=not-found-action.d.ts.map |
@@ -7,2 +7,4 @@ "use strict"; | ||
* Default fall back "Not Found" (404) action | ||
* | ||
* @param injector The injector from the current stack | ||
*/ | ||
@@ -9,0 +11,0 @@ exports.NotFoundAction = async (injector) => { |
import { RouteModel } from './models/route-model'; | ||
/** | ||
* Default routes for /login, /logout and /getCurrentUser | ||
* @param msg The incoming HTTP Message | ||
* | ||
* @param injector The injector from the current stack | ||
* @returns The route on match | ||
*/ | ||
export declare const defaultLoginRoutes: RouteModel; | ||
//# sourceMappingURL=default-login-routes.d.ts.map |
@@ -7,3 +7,5 @@ "use strict"; | ||
* Default routes for /login, /logout and /getCurrentUser | ||
* @param msg The incoming HTTP Message | ||
* | ||
* @param injector The injector from the current stack | ||
* @returns The route on match | ||
*/ | ||
@@ -10,0 +12,0 @@ exports.defaultLoginRoutes = injector => { |
@@ -61,3 +61,3 @@ "use strict"; | ||
utils_1.usingAsync(getInjector(), async (i) => { | ||
const ExampleAction = async (injector) => { | ||
const ExampleAction = async () => { | ||
done(); | ||
@@ -83,3 +83,3 @@ return models_1.EmptyResult(); | ||
}; | ||
const ExampleErrorAction = async (injector) => { | ||
const ExampleErrorAction = async () => { | ||
done(); | ||
@@ -86,0 +86,0 @@ return models_1.EmptyResult(); |
@@ -26,2 +26,3 @@ import { IncomingMessage, ServerResponse } from 'http'; | ||
* Returns if the current user can be authorized with ALL of the specified roles | ||
* | ||
* @param roles The list of roles to authorize | ||
@@ -32,2 +33,5 @@ */ | ||
* Checks if the system contains a user with the provided name and password, throws an error otherwise | ||
* | ||
* @param userName The username | ||
* @param password The password | ||
*/ | ||
@@ -43,2 +47,3 @@ authenticateUser(userName: string, password: string): Promise<{ | ||
* Creates and sets up a cookie-based session for the provided user | ||
* | ||
* @param user The user to create a session for | ||
@@ -45,0 +50,0 @@ * @param serverResponse A serverResponse to set the cookie |
@@ -36,2 +36,3 @@ "use strict"; | ||
* Returns if the current user can be authorized with ALL of the specified roles | ||
* | ||
* @param roles The list of roles to authorize | ||
@@ -50,2 +51,5 @@ */ | ||
* Checks if the system contains a user with the provided name and password, throws an error otherwise | ||
* | ||
* @param userName The username | ||
* @param password The password | ||
*/ | ||
@@ -122,2 +126,3 @@ async authenticateUser(userName, password) { | ||
* Creates and sets up a cookie-based session for the provided user | ||
* | ||
* @param user The user to create a session for | ||
@@ -124,0 +129,0 @@ * @param serverResponse A serverResponse to set the cookie |
@@ -9,2 +9,3 @@ import { IncomingMessage, ServerResponse } from 'http'; | ||
* Reads the post's body and returns a promise with a parsed value | ||
* | ||
* @param incomingMessage The incoming message instance | ||
@@ -15,2 +16,3 @@ */ | ||
* Adds the specified CORS headers to the response | ||
* | ||
* @param options The CORS Options object | ||
@@ -17,0 +19,0 @@ * @param incomingMessage The incoming message instance |
@@ -11,2 +11,3 @@ "use strict"; | ||
* Reads the post's body and returns a promise with a parsed value | ||
* | ||
* @param incomingMessage The incoming message instance | ||
@@ -34,2 +35,3 @@ */ | ||
* Adds the specified CORS headers to the response | ||
* | ||
* @param options The CORS Options object | ||
@@ -36,0 +38,0 @@ * @param incomingMessage The incoming message instance |
{ | ||
"name": "@furystack/http-api", | ||
"version": "5.3.18", | ||
"version": "5.3.19", | ||
"description": "HTTP Api FuryStack package", | ||
@@ -30,24 +30,8 @@ "main": "dist/index.js", | ||
}, | ||
"nyc": { | ||
"exclude": [ | ||
"temp/test/**/*.*", | ||
"temp/src/**/I*.js", | ||
"**/index.js" | ||
], | ||
"include": "temp/src/**/*.*", | ||
"check-coverage": true, | ||
"cache": true, | ||
"all": true, | ||
"reporter": [ | ||
"lcov", | ||
"text-summary", | ||
"json" | ||
] | ||
}, | ||
"homepage": "https://github.com/furystack/core.git", | ||
"dependencies": { | ||
"@furystack/core": "^7.0.8", | ||
"@furystack/inject": "^4.0.13", | ||
"@furystack/logging": "^2.0.19", | ||
"@furystack/utils": "^1.1.6", | ||
"@furystack/core": "^7.0.9", | ||
"@furystack/inject": "^4.0.14", | ||
"@furystack/logging": "^2.0.20", | ||
"@furystack/utils": "^1.1.7", | ||
"hash.js": "^1.1.7", | ||
@@ -63,3 +47,3 @@ "tslib": "^1.11.1", | ||
"typings": "./dist/index.d.ts", | ||
"gitHead": "75c0e5966e4f8c7b758cd4a002da6e664b85a350" | ||
"gitHead": "f4e280db8dc81a721567306b502f80b71a88d913" | ||
} |
@@ -6,2 +6,4 @@ import { RequestAction, JsonResult } from '../models/request-action' | ||
* Action that returns the current authenticated user | ||
* | ||
* @param injector The injector from the current stack | ||
*/ | ||
@@ -8,0 +10,0 @@ export const GetCurrentUser: RequestAction = async injector => { |
@@ -6,2 +6,4 @@ import { RequestAction, JsonResult } from '../models/request-action' | ||
* Action that returns if the current user is authenticated | ||
* | ||
* @param injector The injector from the current stack | ||
*/ | ||
@@ -8,0 +10,0 @@ export const IsAuthenticated: RequestAction = async injector => { |
@@ -6,2 +6,4 @@ import { HttpUserContext } from '../http-user-context' | ||
* Action that logs out the current user | ||
* | ||
* @param injector The injector from the current stack | ||
*/ | ||
@@ -8,0 +10,0 @@ export const LogoutAction: RequestAction = async injector => { |
@@ -6,2 +6,4 @@ import { IncomingMessage } from 'http' | ||
* Default fall back "Not Found" (404) action | ||
* | ||
* @param injector The injector from the current stack | ||
*/ | ||
@@ -8,0 +10,0 @@ export const NotFoundAction: RequestAction = async injector => { |
@@ -7,3 +7,5 @@ import { parse } from 'url' | ||
* Default routes for /login, /logout and /getCurrentUser | ||
* @param msg The incoming HTTP Message | ||
* | ||
* @param injector The injector from the current stack | ||
* @returns The route on match | ||
*/ | ||
@@ -10,0 +12,0 @@ export const defaultLoginRoutes: RouteModel = injector => { |
@@ -67,3 +67,3 @@ import { Injector, Constructable } from '@furystack/inject' | ||
usingAsync(getInjector(), async i => { | ||
const ExampleAction: RequestAction = async injector => { | ||
const ExampleAction: RequestAction = async () => { | ||
done() | ||
@@ -90,3 +90,3 @@ return EmptyResult() | ||
const ExampleErrorAction: RequestAction = async injector => { | ||
const ExampleErrorAction: RequestAction = async () => { | ||
done() | ||
@@ -93,0 +93,0 @@ return EmptyResult() |
@@ -37,2 +37,3 @@ import { IncomingMessage, ServerResponse } from 'http' | ||
* Returns if the current user can be authorized with ALL of the specified roles | ||
* | ||
* @param roles The list of roles to authorize | ||
@@ -52,2 +53,5 @@ */ | ||
* Checks if the system contains a user with the provided name and password, throws an error otherwise | ||
* | ||
* @param userName The username | ||
* @param password The password | ||
*/ | ||
@@ -131,2 +135,3 @@ public async authenticateUser(userName: string, password: string) { | ||
* Creates and sets up a cookie-based session for the provided user | ||
* | ||
* @param user The user to create a session for | ||
@@ -133,0 +138,0 @@ * @param serverResponse A serverResponse to set the cookie |
@@ -12,2 +12,3 @@ import { IncomingMessage, ServerResponse } from 'http' | ||
* Reads the post's body and returns a promise with a parsed value | ||
* | ||
* @param incomingMessage The incoming message instance | ||
@@ -36,2 +37,3 @@ */ | ||
* Adds the specified CORS headers to the response | ||
* | ||
* @param options The CORS Options object | ||
@@ -38,0 +40,0 @@ * @param incomingMessage The incoming message instance |
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
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
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
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
231476
3471
Updated@furystack/core@^7.0.9
Updated@furystack/inject@^4.0.14
Updated@furystack/logging@^2.0.20
Updated@furystack/utils@^1.1.7