refactor: read auth provider info from app config

This commit is contained in:
Jovan Krunić
2022-02-07 16:46:29 +00:00
committed by Rainer Killinger
parent a1592f84cc
commit fb7b3fd1d2
19 changed files with 216 additions and 287 deletions

View File

@@ -12,7 +12,7 @@
* You should have received a copy of the GNU General Public License along with
* this program. If not, see <https://www.gnu.org/licenses/>.
*/
import {SCBackendAggregationConfiguration, SCThingType} from '@openstapps/core';
import {SCAuthorizationProvider, SCBackendAggregationConfiguration, SCThingType} from '@openstapps/core';
// provides sample aggregations to be used in tests or backendless development
export const sampleAggregations: SCBackendAggregationConfiguration[] = [
@@ -65,3 +65,27 @@ export const sampleAggregations: SCBackendAggregationConfiguration[] = [
fieldName: 'type',
},
];
export const sampleAuthConfiguration: {
default: SCAuthorizationProvider;
paia: SCAuthorizationProvider;
} = {
default: {
client: {clientId: '', scopes: '', url: ''},
endpoints: {
authorization: '',
mapping: {id: '', name: ''},
token: '',
userinfo: '',
},
},
paia: {
client: {clientId: '', scopes: '', url: ''},
endpoints: {
authorization: '',
mapping: {id: '', name: ''},
token: '',
userinfo: '',
},
},
};