You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
17 lines
336 B
17 lines
336 B
2 years ago
|
export interface AuthenticationInterface {
|
||
|
key: string
|
||
|
token(): string
|
||
|
}
|
||
|
|
||
|
export class BearerAuthentication implements AuthenticationInterface {
|
||
|
key = 'Authorization'
|
||
|
_token: string
|
||
|
|
||
|
constructor(token: string) {
|
||
|
this._token = token
|
||
|
}
|
||
|
|
||
|
token(): string {
|
||
|
return `Bearer ${this._token}`;
|
||
|
}
|
||
|
}
|