refactor: auth

Co-authored-by: Andrew Bastin <andrewbastin.k@gmail.com>
This commit is contained in:
liyasthomas
2021-08-12 09:56:05 +05:30
parent dad18aabcb
commit 971b35a252
8 changed files with 308 additions and 52 deletions

View File

@@ -0,0 +1,21 @@
export type HoppRESTAuthNone = {
authType: "none"
}
export type HoppRESTAuthBasic = {
authType: "basic"
username: string
password: string
}
export type HoppRESTAuthBearer = {
authType: "bearer"
token: string
}
export type HoppRESTAuth =
| HoppRESTAuthNone
| HoppRESTAuthBasic
| HoppRESTAuthBearer