mirror of
https://mau.dev/mautrix/go.git
synced 2026-03-14 14:25:53 +01:00
bridgev2/login: add wait_for_url_pattern field to cookie logins
This commit is contained in:
parent
6eb4c7b17f
commit
ba43e615f8
2 changed files with 20 additions and 0 deletions
|
|
@ -159,6 +159,12 @@ type LoginCookiesParams struct {
|
|||
// The snippet will evaluate to a promise that resolves when the relevant fields are found.
|
||||
// Fields that are not present in the promise result must be extracted another way.
|
||||
ExtractJS string `json:"extract_js,omitempty"`
|
||||
// A regex pattern that the URL should match before the client closes the webview.
|
||||
//
|
||||
// The client may submit the login if the user closes the webview after all cookies are collected
|
||||
// even if this URL is not reached, but it should only automatically close the webview after
|
||||
// both cookies and the URL match.
|
||||
WaitForURLPattern string `json:"wait_for_url_pattern,omitempty"`
|
||||
}
|
||||
|
||||
type LoginInputFieldType string
|
||||
|
|
|
|||
|
|
@ -671,6 +671,20 @@ components:
|
|||
user_agent:
|
||||
type: string
|
||||
description: An optional user agent that the webview should use.
|
||||
wait_for_url_pattern:
|
||||
type: string
|
||||
description: |
|
||||
A regex pattern that the URL should match before the client closes the webview.
|
||||
|
||||
The client may submit the login if the user closes the webview after all cookies are collected
|
||||
even if this URL is not reached, but it should only automatically close the webview after
|
||||
both cookies and the URL match.
|
||||
extract_js:
|
||||
type: string
|
||||
description: |
|
||||
A JavaScript snippet that can extract some or all of the fields.
|
||||
The snippet will evaluate to a promise that resolves when the relevant fields are found.
|
||||
Fields that are not present in the promise result must be extracted another way.
|
||||
fields:
|
||||
type: array
|
||||
description: The list of cookies or other stored data that must be extracted.
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue