@gtsc/api-auth-entity-storage-service
Advanced tools
Comparing version 0.0.5-next.2 to 0.0.5-next.3
export * from "./entities/authenticationUser"; | ||
export * from "./models/IAuthCookieProcessorConfig"; | ||
export * from "./models/IAuthHeaderProcessorConfig"; | ||
export * from "./models/IEntityStorageAuthenticationServiceConfig"; | ||
export * from "./processors/authCookieProcessor"; | ||
export * from "./processors/authHeaderProcessor"; | ||
export * from "./restEntryPoints"; | ||
@@ -6,0 +6,0 @@ export * from "./routes/entityStorageAuthenticationRoutes"; |
@@ -11,7 +11,2 @@ /** | ||
/** | ||
* The name of the cookie to use for the token. | ||
* @default access_token | ||
*/ | ||
cookieName?: string; | ||
/** | ||
* The default time to live for the JWT. | ||
@@ -18,0 +13,0 @@ * @default 1440 |
@@ -9,3 +9,2 @@ import type { IVaultConnector } from "@gtsc/vault-models"; | ||
* Create a new token. | ||
* @param systemIdentity The system identity. | ||
* @param vaultConnector The vault connector. | ||
@@ -17,3 +16,3 @@ * @param signingKeyName The signing key name. | ||
*/ | ||
static createToken(systemIdentity: string | undefined, vaultConnector: IVaultConnector, signingKeyName: string, subject: string, ttlMinutes: number): Promise<{ | ||
static createToken(vaultConnector: IVaultConnector, signingKeyName: string, subject: string, ttlMinutes: number): Promise<{ | ||
token: string; | ||
@@ -24,3 +23,2 @@ expiry: number; | ||
* Verify the token. | ||
* @param systemIdentity The system identity. | ||
* @param vaultConnector The vault connector. | ||
@@ -32,3 +30,3 @@ * @param signingKeyName The signing key name. | ||
*/ | ||
static verify(systemIdentity: string | undefined, vaultConnector: IVaultConnector, signingKeyName: string, token: string | undefined): Promise<{ | ||
static verify(vaultConnector: IVaultConnector, signingKeyName: string, token: string | undefined): Promise<{ | ||
header: IJwtHeader; | ||
@@ -43,3 +41,6 @@ payload: IJwtPayload; | ||
*/ | ||
static extractTokenFromHeaders(headers?: IHttpHeaders, cookieName?: string): string | undefined; | ||
static extractTokenFromHeaders(headers?: IHttpHeaders, cookieName?: string): { | ||
token: string | undefined; | ||
location: "authorization" | "cookie" | undefined; | ||
}; | ||
} |
@@ -19,3 +19,3 @@ # Class: TokenHelper | ||
> `static` **createToken**(`systemIdentity`, `vaultConnector`, `signingKeyName`, `subject`, `ttlMinutes`): `Promise`\<`object`\> | ||
> `static` **createToken**(`vaultConnector`, `signingKeyName`, `subject`, `ttlMinutes`): `Promise`\<`object`\> | ||
@@ -26,6 +26,2 @@ Create a new token. | ||
• **systemIdentity**: `undefined` \| `string` | ||
The system identity. | ||
• **vaultConnector**: `IVaultConnector` | ||
@@ -65,3 +61,3 @@ | ||
> `static` **verify**(`systemIdentity`, `vaultConnector`, `signingKeyName`, `token`): `Promise`\<`object`\> | ||
> `static` **verify**(`vaultConnector`, `signingKeyName`, `token`): `Promise`\<`object`\> | ||
@@ -72,6 +68,2 @@ Verify the token. | ||
• **systemIdentity**: `undefined` \| `string` | ||
The system identity. | ||
• **vaultConnector**: `IVaultConnector` | ||
@@ -111,3 +103,3 @@ | ||
> `static` **extractTokenFromHeaders**(`headers`?, `cookieName`?): `undefined` \| `string` | ||
> `static` **extractTokenFromHeaders**(`headers`?, `cookieName`?): `object` | ||
@@ -128,4 +120,12 @@ Extract the auth token from the headers, either from the authorization header or the cookie header. | ||
`undefined` \| `string` | ||
`object` | ||
The token if found. | ||
##### token | ||
> **token**: `undefined` \| `string` | ||
##### location | ||
> **location**: `undefined` \| `"authorization"` \| `"cookie"` |
@@ -6,3 +6,3 @@ # @gtsc/api-auth-entity-storage-service | ||
- [AuthenticationUser](classes/AuthenticationUser.md) | ||
- [AuthCookieProcessor](classes/AuthCookieProcessor.md) | ||
- [AuthHeaderProcessor](classes/AuthHeaderProcessor.md) | ||
- [EntityStorageAuthenticationService](classes/EntityStorageAuthenticationService.md) | ||
@@ -14,3 +14,3 @@ - [PasswordHelper](classes/PasswordHelper.md) | ||
- [IAuthCookieProcessorConfig](interfaces/IAuthCookieProcessorConfig.md) | ||
- [IAuthHeaderProcessorConfig](interfaces/IAuthHeaderProcessorConfig.md) | ||
- [IEntityStorageAuthenticationServiceConfig](interfaces/IEntityStorageAuthenticationServiceConfig.md) | ||
@@ -17,0 +17,0 @@ |
@@ -21,16 +21,2 @@ # Interface: IEntityStorageAuthenticationServiceConfig | ||
### cookieName? | ||
> `optional` **cookieName**: `string` | ||
The name of the cookie to use for the token. | ||
#### Default | ||
```ts | ||
access_token | ||
``` | ||
*** | ||
### defaultTtlMinutes? | ||
@@ -37,0 +23,0 @@ |
{ | ||
"name": "@gtsc/api-auth-entity-storage-service", | ||
"version": "0.0.5-next.2", | ||
"version": "0.0.5-next.3", | ||
"description": "Auth Entity Storage contract implementation and REST endpoint definitions", | ||
@@ -17,5 +17,5 @@ "repository": { | ||
"dependencies": { | ||
"@gtsc/api-auth-entity-storage-models": "0.0.5-next.2", | ||
"@gtsc/api-core": "0.0.5-next.2", | ||
"@gtsc/api-models": "0.0.5-next.2", | ||
"@gtsc/api-auth-entity-storage-models": "0.0.5-next.3", | ||
"@gtsc/api-core": "0.0.5-next.3", | ||
"@gtsc/api-models": "0.0.5-next.3", | ||
"@gtsc/core": "next", | ||
@@ -22,0 +22,0 @@ "@gtsc/crypto": "next", |
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
85561
1500
+ Added@gtsc/api-auth-entity-storage-models@0.0.5-next.3(transitive)
+ Added@gtsc/api-core@0.0.5-next.3(transitive)
+ Added@gtsc/api-models@0.0.5-next.3(transitive)
- Removed@gtsc/api-auth-entity-storage-models@0.0.5-next.2(transitive)
- Removed@gtsc/api-core@0.0.5-next.2(transitive)
- Removed@gtsc/api-models@0.0.5-next.2(transitive)
Updated@gtsc/api-core@0.0.5-next.3