mirror of
https://github.com/AJMicke/KickerELO.git
synced 2026-03-11 13:31:02 +01:00
Add secrets
This commit is contained in:
4
.gitignore
vendored
4
.gitignore
vendored
@@ -5,6 +5,10 @@ target/
|
||||
data.mv.db
|
||||
src/main/bundles
|
||||
|
||||
# for secrets
|
||||
.env
|
||||
.vscode
|
||||
|
||||
### IntelliJ IDEA ###
|
||||
.idea/modules.xml
|
||||
.idea/jarRepositories.xml
|
||||
|
||||
@@ -33,20 +33,22 @@ public class KickerAppLayout extends AppLayout {
|
||||
|
||||
// Add login/logout button
|
||||
Authentication auth = SecurityContextHolder.getContext().getAuthentication();
|
||||
if (auth != null && auth.isAuthenticated() && !(auth instanceof AnonymousAuthenticationToken)) {
|
||||
Anchor logoutLink = new Anchor("/logout", "Logout (" + auth.getName() + ")");
|
||||
logoutLink.getElement().getStyle()
|
||||
.set("margin-left", "auto")
|
||||
.set("margin-right", "10px")
|
||||
.set("align-self", "center");
|
||||
addToNavbar(logoutLink);
|
||||
boolean isAuthenticated = auth != null && auth.isAuthenticated() && !(auth instanceof AnonymousAuthenticationToken);
|
||||
|
||||
if (isAuthenticated) {
|
||||
Anchor logoutLink = new Anchor("/logout", "Logout (" + auth.getName() + ")");
|
||||
logoutLink.getElement().getStyle()
|
||||
.set("margin-left", "auto")
|
||||
.set("margin-right", "10px")
|
||||
.set("align-self", "center");
|
||||
addToNavbar(logoutLink);
|
||||
} else {
|
||||
Anchor loginLink = new Anchor("/oauth2/authorization/oidc", "Login");
|
||||
loginLink.getElement().getStyle()
|
||||
.set("margin-left", "auto")
|
||||
.set("margin-right", "10px")
|
||||
.set("align-self", "center");
|
||||
addToNavbar(loginLink);
|
||||
Anchor loginLink = new Anchor("/oauth2/authorization/oidc", "Login");
|
||||
loginLink.getElement().getStyle()
|
||||
.set("margin-left", "auto")
|
||||
.set("margin-right", "10px")
|
||||
.set("align-self", "center");
|
||||
addToNavbar(loginLink);
|
||||
}
|
||||
|
||||
SideNav general = new SideNav("Allgemein");
|
||||
|
||||
@@ -10,9 +10,9 @@ spring.jpa.hibernate.ddl-auto=update
|
||||
spring.jpa.show-sql=true
|
||||
|
||||
# == OIDC Configuration ==
|
||||
spring.security.oauth2.client.registration.oidc.client-id=client-id
|
||||
spring.security.oauth2.client.registration.oidc.client-secret=client-secret
|
||||
spring.security.oauth2.client.registration.oidc.client-id=${OIDC_CLIENT_ID}
|
||||
spring.security.oauth2.client.registration.oidc.client-secret=${OIDC_CLIENT_SECRET}
|
||||
spring.security.oauth2.client.registration.oidc.scope=openid,profile,email
|
||||
spring.security.oauth2.client.registration.oidc.redirect-uri={baseUrl}/login/oauth2/code/{registrationId}
|
||||
|
||||
spring.security.oauth2.client.provider.oidc.issuer-uri=https://auth.fs.cs.uni-frankfurt.de/application/o/oidc/
|
||||
spring.security.oauth2.client.provider.oidc.issuer-uri=${OIDC_ISSUER_URI}
|
||||
|
||||
Reference in New Issue
Block a user