Change Keycloak Client from apiman-devportal to devportal
MODIFY
src/app/app-init.ts
src/app/app-init.ts
@@ -7,7 +7,7 @@ export function initializer(keycloak: KeycloakService): () => Promise<any> {
config: {
url: environment.keycloakAuthUrl,
realm: 'Apiman',
- clientId: 'apiman-devportal'
+ clientId: 'devportal'
},
initOptions: {
onLoad: 'login-required',

MODIFY
src/app/components/admin/services/keycloak-interaction.service.ts
src/app/components/admin/services/keycloak-interaction.service.ts
@@ -26,12 +26,12 @@ export class KeycloakInteractionService {
}
/**
- * Get UUID of apiman-devportal client
+ * Get UUID of devportal client
*/
private getDevPortalClientUUID() {
return from(this.kcAdminClient.clients.find())
.pipe(mergeAll())
- .pipe(single(client => client.clientId === 'apiman-devportal'), map(client => client.id))
+ .pipe(single(client => client.clientId === 'devportal'), map(client => client.id))
.pipe(share()); // fire only once and cache the result for other subscribers
}

MODIFY
src/app/components/developer/developer.component.ts
src/app/components/developer/developer.component.ts
@@ -13,7 +13,7 @@ export class DeveloperComponent {
constructor(private keycloak: KeycloakService) {
// get keycloak client roles of devportal
- const resourceAccess = this.keycloak.getKeycloakInstance().tokenParsed.resource_access['apiman-devportal'];
+ const resourceAccess = this.keycloak.getKeycloakInstance().tokenParsed.resource_access['devportal'];
if (resourceAccess && resourceAccess.roles) {
this.developers = resourceAccess.roles;
}

GW-263: Change Keycloak Client from apiman-devportal to devportal