Feature/change auth endpoint from get to post (#1823)

* Change auth endpoint from GET to POST
  * Login with security token
  * Login with Internet Identity

* Update changelog
This commit is contained in:
Thomas Kaul
2023-04-05 18:10:29 +02:00
committed by GitHub
parent d55c052f57
commit b74a042da8
4 changed files with 14 additions and 13 deletions

View File

@@ -388,9 +388,9 @@ export class DataService {
}
public loginAnonymous(accessToken: string) {
return this.http.get<OAuthResponse>(
`/api/v1/auth/anonymous/${accessToken}`
);
return this.http.post<OAuthResponse>(`/api/v1/auth/anonymous`, {
accessToken
});
}
public postAccess(aAccess: CreateAccessDto) {

View File

@@ -30,9 +30,9 @@ export class InternetIdentityService implements OnDestroy {
const principalId = authClient.getIdentity().getPrincipal();
this.http
.get<OAuthResponse>(
`/api/v1/auth/internet-identity/${principalId.toText()}`
)
.post<OAuthResponse>(`/api/v1/auth/internet-identity`, {
principalId: principalId.toText()
})
.pipe(
catchError(() => {
reject();