mirror of
https://gitlab.com/openstapps/openstapps.git
synced 2026-01-10 19:52:53 +00:00
feat: add auth support (default and paia)
This commit is contained in:
committed by
Jovan Krunić
parent
046a95ba1d
commit
b5f239ea4e
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (C) 2018-2020 StApps
|
||||
* Copyright (C) 2018-2022 StApps
|
||||
* This program is free software: you can redistribute it and/or modify it
|
||||
* under the terms of the GNU General Public License as published by the Free
|
||||
* Software Foundation, version 3.
|
||||
@@ -16,11 +16,65 @@
|
||||
// The build system defaults to the dev environment which uses `environment.ts`, but if you do
|
||||
// `ng build --env=prod` then `environment.prod.ts` will be used instead.
|
||||
// The list of which env maps to which file can be found in `.angular-cli.json`.
|
||||
import {AuthorizationServiceConfigurationJson} from '@openid/appauth';
|
||||
import {IAuthConfig} from 'ionic-appauth';
|
||||
// import config from 'capacitor.config';
|
||||
|
||||
const appDomain = 'mobile.app.uni-frankfurt.de';
|
||||
|
||||
export const environment = {
|
||||
backend_url: 'https://mobile.server.uni-frankfurt.de',
|
||||
appDomain: 'mobile.app.uni-frankfurt.de',
|
||||
backend_version: '2.0.0',
|
||||
use_fake_backend: false,
|
||||
production: false,
|
||||
oauth2: {
|
||||
client: {
|
||||
his: {
|
||||
client_id: '1cac3f99-33fa-4234-8438-979f07e0cdab',
|
||||
client_secret: '',
|
||||
server_host: 'https://cas.rz.uni-frankfurt.de/cas/oauth2.0',
|
||||
redirect_url: `https://${appDomain}/auth/callback`,
|
||||
scopes: '',
|
||||
pkce: true,
|
||||
} as IAuthConfig,
|
||||
paia: {
|
||||
client_id: '',
|
||||
client_secret: '',
|
||||
server_host:
|
||||
'https://hds.hebis.de/Shibboleth.sso/UBFFM?target=https://hds.hebis.de/ubffm/paia_login_stub.php',
|
||||
// TODO: Use Custom URL Scheme (ideally bundle ID from capacitor.config)
|
||||
redirect_url: `https://${appDomain}/auth/paia/callback`,
|
||||
scopes: '',
|
||||
// TODO: PAIA need to support PKCE, it will then work "out-of-the-box"
|
||||
pkce: true,
|
||||
} as IAuthConfig,
|
||||
},
|
||||
service: {
|
||||
his: {
|
||||
authorization_endpoint:
|
||||
'https://cas.rz.uni-frankfurt.de/cas/oauth2.0/authorize',
|
||||
token_endpoint:
|
||||
'https://cas.rz.uni-frankfurt.de/cas/oauth2.0/accessToken',
|
||||
userinfo_endpoint:
|
||||
'https://cas.rz.uni-frankfurt.de/cas/oauth2.0/profile',
|
||||
} as AuthorizationServiceConfigurationJson,
|
||||
paia: {
|
||||
authorization_endpoint:
|
||||
'https://hds.hebis.de/Shibboleth.sso/UBFFM?target=https://hds.hebis.de/ubffm/paia_login_stub.php',
|
||||
token_endpoint: 'https://hds.hebis.de:8443/auth/login',
|
||||
userinfo_endpoint: 'https://hds.hebis.de:8443/core',
|
||||
} as AuthorizationServiceConfigurationJson,
|
||||
},
|
||||
endpointMappings: {
|
||||
userinfo: {
|
||||
id: 'employeeNumber',
|
||||
given_name: 'givenName',
|
||||
family_name: 'sn',
|
||||
email: 'mailPrimaryAddress',
|
||||
},
|
||||
},
|
||||
},
|
||||
};
|
||||
|
||||
/*
|
||||
|
||||
Reference in New Issue
Block a user