mirror of
https://github.com/goharbor/harbor.git
synced 2024-11-06 18:50:09 +01:00
Merge pull request #2198 from wknet123/release-1.1.0-fix
Encode sign-in params.
This commit is contained in:
commit
11beddaaf9
@ -68,12 +68,11 @@ export class SessionService {
|
||||
//Submit signin form to backend (NOT restful service)
|
||||
signIn(signInCredential: SignInCredential): Promise<any> {
|
||||
//Build the form package
|
||||
const body = new URLSearchParams();
|
||||
body.set('principal', signInCredential.principal);
|
||||
body.set('password', signInCredential.password);
|
||||
let queryParam:string = 'principal=' + encodeURIComponent(signInCredential.principal) +
|
||||
'&password=' + encodeURIComponent(signInCredential.password);
|
||||
|
||||
//Trigger Http
|
||||
return this.http.post(signInUrl, body.toString(), { headers: this.formHeaders })
|
||||
return this.http.post(signInUrl, queryParam, { headers: this.formHeaders })
|
||||
.toPromise()
|
||||
.then(() => null)
|
||||
.catch(error => this.handleError(error));
|
||||
|
Loading…
Reference in New Issue
Block a user