Feature/open id sign in (#35)

* added errorOpenIdLogin i18n key
* added openid authProvider
* added postOpenIdLogin api call
* added via-open-id component

Signed-off-by: Philip Molares <philip.molares@udo.edu>
This commit is contained in:
Philip Molares 2020-05-16 23:21:05 +02:00 committed by GitHub
parent d2c6ea464d
commit a50ad6e6c8
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
8 changed files with 92 additions and 9 deletions

View file

@ -43,3 +43,22 @@ export const postLdapLogin = async (username: string, password: string) => {
.then(expectResponseCode())
.then(response => response.json());
}
export const postOpenIdLogin = async (openId: string) => {
return fetch(getBackendUrl() + "/auth/openid", {
method: 'POST',
mode: 'cors',
cache: 'no-cache',
credentials: 'same-origin',
headers: {
'Content-Type': 'application/json'
},
redirect: 'follow',
referrerPolicy: 'no-referrer',
body: JSON.stringify({
openId: openId
})
})
.then(expectResponseCode())
.then(response => response.json());
}