Last active
June 28, 2018 10:25
-
-
Save davidgabrichidze/1d60b93dea9f9bdeb5795ee9b4233c27 to your computer and use it in GitHub Desktop.
mms API protocol
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public async login(STS_URL: string, CLIENT_ID: string, userName: string, password: string): Observable<any> { | |
return this.http.post<any>( | |
`${STS_URL}/token`, // STS-ის ვებ სერვისის მისამართი /token endpoint-ზე უსმენს აუტენთიფიკაციის მოთხოვნებს | |
`grant_type=password&client_id=${CLIENT_ID}&username=${userName}&password=${password}` // payload-ის ფორმატი | |
).pipe(map((token: any) => { | |
return token; | |
})) | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment