-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add settings page to delete user (#182)
- Loading branch information
1 parent
1222ea7
commit 4131054
Showing
14 changed files
with
2,696 additions
and
2,116 deletions.
There are no files selected for viewing
4,456 changes: 2,382 additions & 2,074 deletions
4,456
server/application-server/keycloak-hephaestus-realm-example-config.json
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
35 changes: 35 additions & 0 deletions
35
server/application-server/src/main/java/de/tum/in/www1/hephaestus/config/KeycloakConfig.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
package de.tum.in.www1.hephaestus.config; | ||
import org.keycloak.OAuth2Constants; | ||
import org.keycloak.admin.client.Keycloak; | ||
import org.keycloak.admin.client.KeycloakBuilder; | ||
import org.springframework.context.annotation.Bean; | ||
import org.springframework.context.annotation.Configuration; | ||
import org.springframework.beans.factory.annotation.Value; | ||
|
||
|
||
@Configuration | ||
public class KeycloakConfig { | ||
|
||
@Value("${keycloak.url}") | ||
private String authServerUrl; | ||
|
||
@Value("${keycloak.realm}") | ||
private String realm; | ||
|
||
@Value("${keycloak.client-id}") | ||
private String clientId; | ||
|
||
@Value("${keycloak.client-secret}") | ||
private String clientSecret; | ||
|
||
@Bean | ||
public Keycloak keycloakClient() { | ||
return KeycloakBuilder.builder() | ||
.serverUrl(authServerUrl) | ||
.realm(realm) | ||
.grantType(OAuth2Constants.CLIENT_CREDENTIALS) | ||
.clientId(clientId) | ||
.clientSecret(clientSecret) | ||
.build(); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.