mirror of
https://github.com/goharbor/harbor.git
synced 2024-11-07 02:59:50 +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)
|
//Submit signin form to backend (NOT restful service)
|
||||||
signIn(signInCredential: SignInCredential): Promise<any> {
|
signIn(signInCredential: SignInCredential): Promise<any> {
|
||||||
//Build the form package
|
//Build the form package
|
||||||
const body = new URLSearchParams();
|
let queryParam:string = 'principal=' + encodeURIComponent(signInCredential.principal) +
|
||||||
body.set('principal', signInCredential.principal);
|
'&password=' + encodeURIComponent(signInCredential.password);
|
||||||
body.set('password', signInCredential.password);
|
|
||||||
|
|
||||||
//Trigger Http
|
//Trigger Http
|
||||||
return this.http.post(signInUrl, body.toString(), { headers: this.formHeaders })
|
return this.http.post(signInUrl, queryParam, { headers: this.formHeaders })
|
||||||
.toPromise()
|
.toPromise()
|
||||||
.then(() => null)
|
.then(() => null)
|
||||||
.catch(error => this.handleError(error));
|
.catch(error => this.handleError(error));
|
||||||
|
Loading…
Reference in New Issue
Block a user