File tree Expand file tree Collapse file tree 1 file changed +10
-7
lines changed
Expand file tree Collapse file tree 1 file changed +10
-7
lines changed Original file line number Diff line number Diff line change 166166 }
167167
168168 // verify that the username and password are correct
169- const response = await fetch (
170- window .__iisBase +
171- ' auth.asmx/ValidateCredentials?username=' +
172- encodeURIComponent (usernameValue .value ) +
173- ' &password=' +
174- encodeURIComponent (password )
175- )
169+ const response = await fetch (window .__iisBase + ' auth.asmx/ValidateCredentials' , {
170+ method: ' POST' ,
171+ headers: {
172+ ' Content-Type' : ' application/x-www-form-urlencoded' ,
173+ },
174+ body: new URLSearchParams ({
175+ username: usernameValue .value ,
176+ password: password ,
177+ }),
178+ })
176179 .then (parseXmlResponse )
177180 .then ((xmlDoc ) => JSON .parse (xmlDoc .textContent || ' { success: false }' ) as CredentialsResponse )
178181 .catch (() => ({ success: false } as InvalidCredentialsResponse ));
You can’t perform that action at this time.
0 commit comments