feat: add OAuth 2.0 support

This commit is contained in:
liyasthomas
2021-08-25 21:30:13 +05:30
parent 9e16cff62a
commit bc9236c9a7
7 changed files with 250 additions and 18 deletions

View File

@@ -15,8 +15,20 @@ export type HoppRESTAuthBearer = {
token: string
}
export type HoppRESTAuthOAuth2 = {
authType: "oauth-2"
token: string
oidcDiscoveryURL: string
authURL: string
accessTokenURL: string
clientID: string
scope: string
}
export type HoppRESTAuth = { authActive: boolean } & (
| HoppRESTAuthNone
| HoppRESTAuthBasic
| HoppRESTAuthBearer
| HoppRESTAuthOAuth2
)