mirror of
https://github.com/tiddly-gittly/TidGi-Desktop.git
synced 2026-01-21 20:11:50 -08:00
docs: about tokenAuth
This commit is contained in:
parent
9f4a127fc4
commit
064aab95d2
2 changed files with 5 additions and 0 deletions
|
|
@ -44,6 +44,9 @@ function assignFakeUserAgent(details: Electron.OnBeforeSendHeadersListenerDetail
|
|||
details.requestHeaders['User-Agent'] = FAKE_USER_AGENT;
|
||||
}
|
||||
|
||||
/**
|
||||
* Work with tokenAuthenticateArguments in wikiWorker, see there for detail.
|
||||
*/
|
||||
function assignAdminAuthToken(workspaceID: string, details: Electron.OnBeforeSendHeadersListenerDetails, authService: IAuthenticationService, viewContext: IViewSessionContext) {
|
||||
const adminToken = authService.getOneTimeAdminAuthTokenForWorkspaceSync(workspaceID);
|
||||
if (adminToken === undefined) {
|
||||
|
|
|
|||
|
|
@ -82,6 +82,8 @@ function startNodeJSWiki({
|
|||
* For example, when server starts with `"readers=s0me7an6om3ey" writers=s0me7an6om3ey" authenticated-user-header=x-tidgi-auth-token`, only when other app query with header `x-tidgi-auth-token: s0me7an6om3ey`, can it get access to the wiki.
|
||||
*
|
||||
* When this is not enabled, provide a `anon-username` for any users.
|
||||
*
|
||||
* @url https://github.com/Jermolene/TiddlyWiki5/discussions/7469
|
||||
*/
|
||||
let tokenAuthenticateArguments: string[] = [`anon-username=${userName}`];
|
||||
if (tokenAuth === true) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue