Skip to content

Instantly share code, notes, and snippets.

@davidgabrichidze
Last active June 28, 2018 10:25
Show Gist options
  • Save davidgabrichidze/1d60b93dea9f9bdeb5795ee9b4233c27 to your computer and use it in GitHub Desktop.
Save davidgabrichidze/1d60b93dea9f9bdeb5795ee9b4233c27 to your computer and use it in GitHub Desktop.
mms API protocol
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