This is the codeAbility Sharing Platform! Learn more about the codeAbility Sharing Platform.

Skip to content
Snippets Groups Projects
Commit 7e17ea02 authored by Michael Breu's avatar Michael Breu :speech_balloon:
Browse files

Working on OAuth2

parent 1f0ef541
2 merge requests!188Merging Peer Reviewing et. al to Master,!164211 peer reviewing functionality
......@@ -31,7 +31,10 @@ public class OAuth2ConfigDTO {
public OAuth2ConfigDTO(ClientRegistration registration) {
clientURL = registration.getRedirectUri();
registrationId = registration.getRegistrationId();
scopes = registration.getScopes().stream().collect(Collectors.joining(","));
if(registration.getScopes()==null)
scopes = "";
else
scopes = registration.getScopes().stream().collect(Collectors.joining(","));
}
public OAuth2ConfigDTO() {
......
......@@ -62,6 +62,7 @@ export class NavbarComponent implements OnInit {
if (VERSION) {
this.version = VERSION.toLowerCase().startsWith('v') ? VERSION : `v${VERSION}`;
}
}
ngOnInit(): void {
......@@ -71,6 +72,10 @@ export class NavbarComponent implements OnInit {
this.openAPIEnabled = profileInfo.openAPIEnabled;
});
this.oAuth2ConfigService.getAllConfigs().subscribe((loadedConfigs: OAuth2Config[]) => {
this.configs = loadedConfigs;
});
this.accountService.getAuthenticationState().subscribe(account => {
this.account = account;
});
......
function setupProxy({ tls }) {
const conf = [
{
context: ['/api', '/services', '/management', '/v3/api-docs', '/h2-console', '/auth', '/health'],
context: [
'/api',
'/oauth2Config',
'/oauth2',
'/login',
'/services',
'/management',
'/swagger-resources',
'/v3/api-docs',
'/h2-console',
'/auth',
'/health'
],
target: `http${tls ? 's' : ''}://localhost:8080`,
secure: false,
changeOrigin: tls,
......
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment