Skip to content
Snippets Groups Projects
Commit a49cc015 authored by FORESTIER Fabien's avatar FORESTIER Fabien
Browse files

Add token endpoint url in env file

parent 1d847b6d
No related branches found
No related tags found
No related merge requests found
...@@ -30,7 +30,7 @@ export class AuthService { ...@@ -30,7 +30,7 @@ export class AuthService {
} }
exchangeCode(code: string, state: string): Observable<boolean> { exchangeCode(code: string, state: string): Observable<boolean> {
const url = `${env.kongUrl}/authentication/token?code=${code}&state=${state}`; const url = `${env.tokenEndpoint}?code=${code}&state=${state}`;
return this._http.get<ILoginResponse>(url).pipe( return this._http.get<ILoginResponse>(url).pipe(
map( map(
(res) => { (res) => {
...@@ -81,8 +81,7 @@ export class AuthService { ...@@ -81,8 +81,7 @@ export class AuthService {
} catch (error) { } catch (error) {
} }
let url = `${env.kongUrl}/authentication/logout?`; const url = `${env.logoutEndpoint}?id_token=${idToken}&identity_provider=${identityProvider}`;
url += `id_token=${idToken}&identity_provider=${identityProvider}`;
window.location.href = url; window.location.href = url;
} }
......
...@@ -12,6 +12,7 @@ export const environment = { ...@@ -12,6 +12,7 @@ export const environment = {
kongUrl: kongBaseUrl, kongUrl: kongBaseUrl,
oidcLoginEndpoint: kongBaseUrl + '/authentication/dev/login/oidc', oidcLoginEndpoint: kongBaseUrl + '/authentication/dev/login/oidc',
glcLoginEndpoint: kongBaseUrl + '/authentication/dev/login/glc', glcLoginEndpoint: kongBaseUrl + '/authentication/dev/login/glc',
tokenEndpoint: kongBaseUrl + '/authentication/dev/token',
logoutEndpoint: kongBaseUrl + '/authentication/dev/logout', logoutEndpoint: kongBaseUrl + '/authentication/dev/logout',
// ElasticSearch // ElasticSearch
......
...@@ -12,6 +12,7 @@ export const environment = { ...@@ -12,6 +12,7 @@ export const environment = {
kongUrl: kongBaseUrl, kongUrl: kongBaseUrl,
oidcLoginEndpoint: kongBaseUrl + '/authentication/rec/login/oidc', oidcLoginEndpoint: kongBaseUrl + '/authentication/rec/login/oidc',
glcLoginEndpoint: kongBaseUrl + '/authentication/rec/login/glc', glcLoginEndpoint: kongBaseUrl + '/authentication/rec/login/glc',
tokenEndpoint: kongBaseUrl + '/authentication/rec/token',
logoutEndpoint: kongBaseUrl + '/authentication/rec/logout', logoutEndpoint: kongBaseUrl + '/authentication/rec/logout',
// ElasticSearch // ElasticSearch
......
...@@ -12,6 +12,7 @@ export const environment = { ...@@ -12,6 +12,7 @@ export const environment = {
kongUrl: kongBaseUrl, kongUrl: kongBaseUrl,
oidcLoginEndpoint: kongBaseUrl + '/authentication/dev/login/oidc', oidcLoginEndpoint: kongBaseUrl + '/authentication/dev/login/oidc',
glcLoginEndpoint: kongBaseUrl + '/authentication/dev/login/glc', glcLoginEndpoint: kongBaseUrl + '/authentication/dev/login/glc',
tokenEndpoint: kongBaseUrl + '/authentication/dev/token',
logoutEndpoint: kongBaseUrl + '/authentication/dev/logout', logoutEndpoint: kongBaseUrl + '/authentication/dev/logout',
// ElasticSearch // ElasticSearch
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment