-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
943b1d7
commit 8b7d7e2
Showing
4 changed files
with
22 additions
and
13 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,9 +1,7 @@ | ||
import { IAuthnConstant } from '@console-core/types'; | ||
import { TAuthnConstant } from '@console-core/types'; | ||
|
||
export const AUTH: Readonly<IAuthnConstant> = { | ||
headers: { | ||
Accept: 'application/json', | ||
'Content-type': 'application/x-www-form-urlencoded', | ||
Authorization: 'Basic VEVTVF9DTElFTlRfSUQ6VEVTVF9DTElFTlRfU0VDUkVU=', | ||
}, | ||
}; | ||
export const AUTH = (key: string): Readonly<TAuthnConstant> => ({ | ||
Accept: 'application/json', | ||
'Content-type': 'application/x-www-form-urlencoded', | ||
Authorization: `Basic ${key}`, | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,13 @@ | ||
import { IAuthnState, IStoreConstant } from '../interfaces'; | ||
|
||
type AuthnStateKey = IStoreConstant['states']['authnState']; | ||
type TAuthnStateKey = IStoreConstant['states']['authnState']; | ||
|
||
export type IAuthnStateType = { | ||
[key in AuthnStateKey]: IAuthnState; | ||
export type TAuthnStateType = { | ||
[key in TAuthnStateKey]: IAuthnState; | ||
}; | ||
|
||
export type TAuthnConstant = (key: string) => { | ||
Accept: string; | ||
'Content-type': string; | ||
Authorization: string; | ||
}; |