Implement /oauth2/token endpoint; token auth middleware

This commit is contained in:
2022-04-28 11:50:27 -05:00
parent 36647a013d
commit 940d50b89c
11 changed files with 340 additions and 55 deletions

View File

@@ -109,6 +109,20 @@ export class Response {
return this
}
/**
* Remove a header from the response by name.
* @param name
*/
public unsetHeader(name: string): this {
this.logging.verbose(`Will unset header on response: ${name}`)
if ( this.sentHeaders ) {
throw new HeadersAlreadySentError(this, name)
}
delete this.headers[name]
return this
}
/**
* Bulk set the specified headers in the response.
* @param data