Skip to content
Snippets Groups Projects

Feature/semantic enrichment

Merged Baptiste Toulemonde requested to merge feature/semantic_enrichment into master
3 files
+ 45
28
Compare changes
  • Side-by-side
  • Inline
Files
3
@@ -42,7 +42,7 @@ export class AuthService {
FdpSignUp(user: SmartHarvesterUser): Observable<any> {
const httpOptions = {
headers: new HttpHeaders({ 'Content-Type': 'application/json', 'Authorization' : `Baerer ${this.getToken()}` })
headers: new HttpHeaders({ 'Content-Type': 'application/json', Authorization : `Baerer ${this.getToken()}` })
};
return this.http.post(`${this.baseUrl}/harvester/auth/signup`, {
@@ -72,7 +72,7 @@ export class AuthService {
}
updateToken(token) {
this.tokenService.saveTokenSmartHarveser(token)
this.tokenService.saveTokenSmartHarveser(token);
}
fetchToken(code: string, state: string): Observable<any> {
@@ -98,4 +98,15 @@ export class AuthService {
logout() {
return this.http.post(this.baseUrl + '/harvester/logout', this.getToken(), this.httpOptions);
}
getUser(accessToken: string): Observable<any> {
const options = {
headers: new HttpHeaders({
'Content-Type': 'application/json',
'Accept': 'application/json',
'Authorization': 'Bearer ' + accessToken
})
};
return this.http.get(this.baseUrl + '/harvester/api/username', options);
}
}
Loading