Implement /oauth2/token endpoint; token auth middleware
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user