mirror of
https://github.com/AJMicke/KickerELO.git
synced 2026-03-11 13:31:02 +01:00
Working prototype
This commit implements the oidc compatibility with the caveat of having every subsite under the app path. For that, there is also a redirection handler to redirect the home page to the app home page.
This commit is contained in:
9
pom.xml
9
pom.xml
@@ -38,6 +38,10 @@
|
|||||||
<groupId>org.springframework.boot</groupId>
|
<groupId>org.springframework.boot</groupId>
|
||||||
<artifactId>spring-boot-starter-data-jpa</artifactId>
|
<artifactId>spring-boot-starter-data-jpa</artifactId>
|
||||||
</dependency>
|
</dependency>
|
||||||
|
<dependency>
|
||||||
|
<groupId>org.springframework.boot</groupId>
|
||||||
|
<artifactId>spring-boot-starter-web</artifactId>
|
||||||
|
</dependency>
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>com.vaadin</groupId>
|
<groupId>com.vaadin</groupId>
|
||||||
<artifactId>vaadin-spring-boot-starter</artifactId>
|
<artifactId>vaadin-spring-boot-starter</artifactId>
|
||||||
@@ -72,11 +76,6 @@
|
|||||||
<groupId>org.springframework.boot</groupId>
|
<groupId>org.springframework.boot</groupId>
|
||||||
<artifactId>spring-boot-starter-oauth2-client</artifactId>
|
<artifactId>spring-boot-starter-oauth2-client</artifactId>
|
||||||
</dependency>
|
</dependency>
|
||||||
<dependency>
|
|
||||||
<groupId>io.github.cdimascio</groupId>
|
|
||||||
<artifactId>dotenv-java</artifactId>
|
|
||||||
<version>3.0.0</version>
|
|
||||||
</dependency>
|
|
||||||
</dependencies>
|
</dependencies>
|
||||||
<dependencyManagement>
|
<dependencyManagement>
|
||||||
<dependencies>
|
<dependencies>
|
||||||
|
|||||||
@@ -1,13 +1,14 @@
|
|||||||
package org.kickerelo.kickerelo;
|
package org.kickerelo.kickerelo;
|
||||||
|
|
||||||
import com.vaadin.flow.component.page.AppShellConfigurator;
|
|
||||||
import com.vaadin.flow.server.PWA;
|
|
||||||
import com.vaadin.flow.theme.Theme;
|
|
||||||
import org.springframework.boot.SpringApplication;
|
import org.springframework.boot.SpringApplication;
|
||||||
import org.springframework.boot.autoconfigure.SpringBootApplication;
|
import org.springframework.boot.autoconfigure.SpringBootApplication;
|
||||||
import org.springframework.boot.autoconfigure.domain.EntityScan;
|
import org.springframework.boot.autoconfigure.domain.EntityScan;
|
||||||
import org.springframework.data.jpa.repository.config.EnableJpaRepositories;
|
import org.springframework.data.jpa.repository.config.EnableJpaRepositories;
|
||||||
|
|
||||||
|
import com.vaadin.flow.component.page.AppShellConfigurator;
|
||||||
|
import com.vaadin.flow.server.PWA;
|
||||||
|
import com.vaadin.flow.theme.Theme;
|
||||||
|
|
||||||
|
|
||||||
@SpringBootApplication
|
@SpringBootApplication
|
||||||
@EntityScan(basePackages = "org.kickerelo.kickerelo.data")
|
@EntityScan(basePackages = "org.kickerelo.kickerelo.data")
|
||||||
@@ -19,5 +20,4 @@ public class KickerEloApplication implements AppShellConfigurator {
|
|||||||
public static void main(String[] args) {
|
public static void main(String[] args) {
|
||||||
SpringApplication.run(KickerEloApplication.class, args);
|
SpringApplication.run(KickerEloApplication.class, args);
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,47 +1,45 @@
|
|||||||
package org.kickerelo.kickerelo.config;
|
package org.kickerelo.kickerelo.config;
|
||||||
|
|
||||||
import io.github.cdimascio.dotenv.Dotenv;
|
|
||||||
import org.springframework.context.annotation.Bean;
|
import org.springframework.context.annotation.Bean;
|
||||||
import org.springframework.context.annotation.Configuration;
|
import org.springframework.context.annotation.Configuration;
|
||||||
import org.springframework.security.config.annotation.web.builders.HttpSecurity;
|
import org.springframework.security.config.annotation.web.builders.HttpSecurity;
|
||||||
import org.springframework.security.oauth2.client.registration.ClientRegistration;
|
|
||||||
import org.springframework.security.oauth2.client.registration.ClientRegistrationRepository;
|
|
||||||
import org.springframework.security.oauth2.client.registration.InMemoryClientRegistrationRepository;
|
|
||||||
import org.springframework.security.oauth2.core.AuthorizationGrantType;
|
|
||||||
import org.springframework.security.web.SecurityFilterChain;
|
import org.springframework.security.web.SecurityFilterChain;
|
||||||
|
|
||||||
@Configuration
|
@Configuration
|
||||||
public class SecurityConfig {
|
public class SecurityConfig {
|
||||||
|
|
||||||
private final Dotenv dotenv = Dotenv.load();
|
// unnecessary, because already configured in application.properties
|
||||||
|
// private final Dotenv dotenv = Dotenv.load();
|
||||||
|
// @Bean
|
||||||
|
// public ClientRegistrationRepository clientRegistrationRepository() {
|
||||||
|
// ClientRegistration oidcRegistration = ClientRegistration.withRegistrationId("oidc")
|
||||||
|
// .clientId(dotenv.get("OIDC_CLIENT_ID"))
|
||||||
|
// .clientSecret(dotenv.get("OIDC_CLIENT_SECRET"))
|
||||||
|
// .scope("openid", "profile", "email")
|
||||||
|
// .authorizationGrantType(AuthorizationGrantType.AUTHORIZATION_CODE)
|
||||||
|
// .authorizationUri(dotenv.get("OIDC_ISSUER_BASE_URI") + "application/o/authorize/")
|
||||||
|
// .tokenUri(dotenv.get("OIDC_ISSUER_BASE_URI") + "application/o/token/")
|
||||||
|
// .userInfoUri(dotenv.get("OIDC_ISSUER_BASE_URI") + "application/o/userinfo/")
|
||||||
|
// .userNameAttributeName("sub")
|
||||||
|
// .clientName("OIDC")
|
||||||
|
// .redirectUri(dotenv.get("OIDC_REDIRECT_URI"))
|
||||||
|
// .build();
|
||||||
|
|
||||||
@Bean
|
// return new InMemoryClientRegistrationRepository(oidcRegistration);
|
||||||
public ClientRegistrationRepository clientRegistrationRepository() {
|
// }
|
||||||
ClientRegistration oidcRegistration = ClientRegistration.withRegistrationId("oidc")
|
|
||||||
.clientId(dotenv.get("OIDC_CLIENT_ID"))
|
|
||||||
.clientSecret(dotenv.get("OIDC_CLIENT_SECRET"))
|
|
||||||
.scope("openid", "profile", "email")
|
|
||||||
.authorizationGrantType(AuthorizationGrantType.AUTHORIZATION_CODE)
|
|
||||||
.authorizationUri(dotenv.get("OIDC_ISSUER_BASE_URI") + "application/o/authorize/")
|
|
||||||
.tokenUri(dotenv.get("OIDC_ISSUER_BASE_URI") + "application/o/token/")
|
|
||||||
.userInfoUri(dotenv.get("OIDC_ISSUER_BASE_URI") + "application/o/userinfo/")
|
|
||||||
.userNameAttributeName("sub")
|
|
||||||
.clientName("OIDC")
|
|
||||||
.redirectUri(dotenv.get("OIDC_REDIRECT_URI"))
|
|
||||||
.build();
|
|
||||||
|
|
||||||
return new InMemoryClientRegistrationRepository(oidcRegistration);
|
|
||||||
}
|
|
||||||
|
|
||||||
@Bean
|
@Bean
|
||||||
public SecurityFilterChain securityFilterChain(HttpSecurity http) throws Exception {
|
public SecurityFilterChain securityFilterChain(HttpSecurity http) throws Exception {
|
||||||
http
|
http
|
||||||
.authorizeHttpRequests(auth -> auth
|
.authorizeHttpRequests(auth -> auth
|
||||||
.requestMatchers("/oauth2/**").permitAll() // Allow all OAuth2 requests
|
.requestMatchers("/app/admin/**").authenticated() // Nur authentifizierte User
|
||||||
.anyRequest().permitAll() // Allow all requests
|
.anyRequest().permitAll()
|
||||||
)
|
)
|
||||||
.oauth2Login()
|
.oauth2Login(org.springframework.security.config.Customizer.withDefaults())
|
||||||
.and()
|
// .oauth2Login(oauth -> oauth
|
||||||
|
// .defaultSuccessUrl("/app/app/admin", true)
|
||||||
|
// )
|
||||||
|
//.and()
|
||||||
.logout(logout -> logout.logoutSuccessUrl("/"))
|
.logout(logout -> logout.logoutSuccessUrl("/"))
|
||||||
.csrf(csrf -> csrf.disable());
|
.csrf(csrf -> csrf.disable());
|
||||||
|
|
||||||
|
|||||||
@@ -35,8 +35,8 @@ public class KickerAppLayout extends AppLayout {
|
|||||||
Authentication auth = SecurityContextHolder.getContext().getAuthentication();
|
Authentication auth = SecurityContextHolder.getContext().getAuthentication();
|
||||||
boolean isAuthenticated = auth != null && auth.isAuthenticated() && !(auth instanceof AnonymousAuthenticationToken);
|
boolean isAuthenticated = auth != null && auth.isAuthenticated() && !(auth instanceof AnonymousAuthenticationToken);
|
||||||
|
|
||||||
if (isAuthenticated) {
|
if (isAuthenticated && auth != null && auth.getPrincipal() instanceof org.springframework.security.oauth2.core.oidc.user.OidcUser oidcUser) {
|
||||||
Anchor logoutLink = new Anchor("/logout", "Logout (" + auth.getName() + ")");
|
Anchor logoutLink = new Anchor("/logout", "Logout (" + oidcUser.getPreferredUsername() + ")");
|
||||||
logoutLink.getElement().getStyle()
|
logoutLink.getElement().getStyle()
|
||||||
.set("margin-left", "auto")
|
.set("margin-left", "auto")
|
||||||
.set("margin-right", "10px")
|
.set("margin-right", "10px")
|
||||||
|
|||||||
@@ -0,0 +1,12 @@
|
|||||||
|
package org.kickerelo.kickerelo.util;
|
||||||
|
|
||||||
|
import org.springframework.stereotype.Controller;
|
||||||
|
import org.springframework.web.bind.annotation.GetMapping;
|
||||||
|
|
||||||
|
@Controller
|
||||||
|
public class RedirectController {
|
||||||
|
@GetMapping("/")
|
||||||
|
public String redirectToApp() {
|
||||||
|
return "redirect:/app/app";
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -1,21 +1,55 @@
|
|||||||
package org.kickerelo.kickerelo.views;
|
package org.kickerelo.kickerelo.views;
|
||||||
|
|
||||||
|
import org.kickerelo.kickerelo.exception.DuplicatePlayerException;
|
||||||
|
import org.kickerelo.kickerelo.exception.InvalidDataException;
|
||||||
|
import org.kickerelo.kickerelo.exception.PlayerNameNotSetException;
|
||||||
|
import org.kickerelo.kickerelo.service.KickerEloService;
|
||||||
|
import org.springframework.security.core.Authentication;
|
||||||
|
import org.springframework.security.core.context.SecurityContextHolder;
|
||||||
|
import org.springframework.security.oauth2.core.oidc.user.OidcUser;
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
import com.vaadin.flow.component.button.Button;
|
import com.vaadin.flow.component.button.Button;
|
||||||
import com.vaadin.flow.component.html.H2;
|
import com.vaadin.flow.component.html.H2;
|
||||||
|
import com.vaadin.flow.component.html.Paragraph;
|
||||||
import com.vaadin.flow.component.notification.Notification;
|
import com.vaadin.flow.component.notification.Notification;
|
||||||
import com.vaadin.flow.component.notification.NotificationVariant;
|
import com.vaadin.flow.component.notification.NotificationVariant;
|
||||||
import com.vaadin.flow.component.orderedlayout.VerticalLayout;
|
import com.vaadin.flow.component.orderedlayout.VerticalLayout;
|
||||||
import com.vaadin.flow.component.textfield.TextField;
|
import com.vaadin.flow.component.textfield.TextField;
|
||||||
import com.vaadin.flow.router.Route;
|
import com.vaadin.flow.router.Route;
|
||||||
import org.kickerelo.kickerelo.exception.DuplicatePlayerException;
|
|
||||||
import org.kickerelo.kickerelo.exception.InvalidDataException;
|
|
||||||
import org.kickerelo.kickerelo.exception.PlayerNameNotSetException;
|
|
||||||
import org.kickerelo.kickerelo.service.KickerEloService;
|
|
||||||
|
|
||||||
@Route("app/admin")
|
@Route("app/admin")
|
||||||
public class AdminView extends VerticalLayout {
|
public class AdminView extends VerticalLayout {
|
||||||
public AdminView(KickerEloService service) {
|
public AdminView(KickerEloService service) {
|
||||||
H2 subheader = new H2("Verwaltung");
|
// Zeige den aktuell authentifizierten Benutzer
|
||||||
|
Authentication auth = SecurityContextHolder.getContext().getAuthentication();
|
||||||
|
if (auth != null && auth.getPrincipal() instanceof OidcUser oidcUser) {
|
||||||
|
String username = oidcUser.getPreferredUsername();
|
||||||
|
Object groupsObj = oidcUser.getClaims().getOrDefault("groups", List.of());
|
||||||
|
List<String> listOfGroups;
|
||||||
|
if (groupsObj instanceof List<?> groupsList) {
|
||||||
|
listOfGroups = groupsList.stream()
|
||||||
|
.filter(String.class::isInstance)
|
||||||
|
.map(String.class::cast)
|
||||||
|
.toList();
|
||||||
|
} else {
|
||||||
|
listOfGroups = List.of();
|
||||||
|
}
|
||||||
|
add(new Paragraph("Angemeldet als: " + username));
|
||||||
|
add(new Paragraph("Gruppen: " + listOfGroups.toString()));
|
||||||
|
|
||||||
|
if (listOfGroups.contains("Kicker Admin")) {
|
||||||
|
add(new Paragraph("Du bist Admin!"));
|
||||||
|
} else {
|
||||||
|
if (listOfGroups.contains("Kicker User")) {
|
||||||
|
add(new Paragraph("Du bist kein Admin, aber ein kickerelo User!"));
|
||||||
|
} else {
|
||||||
|
add(new Paragraph("Du bist gar nichts!"));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
add(new Paragraph("Niemand ist angemeldet"));
|
||||||
|
}
|
||||||
|
|
||||||
TextField spielername = new TextField("Spielername");
|
TextField spielername = new TextField("Spielername");
|
||||||
spielername.addClassName("bordered");
|
spielername.addClassName("bordered");
|
||||||
@@ -41,6 +75,7 @@ public class AdminView extends VerticalLayout {
|
|||||||
service.recalculateAll1vs1();
|
service.recalculateAll1vs1();
|
||||||
Notification.show("Recalculating finished").addThemeVariants(NotificationVariant.LUMO_SUCCESS);
|
Notification.show("Recalculating finished").addThemeVariants(NotificationVariant.LUMO_SUCCESS);
|
||||||
});
|
});
|
||||||
|
|
||||||
Button recalc2vs2Button = new Button("2 vs 2 Elo neu berechnen", e -> {
|
Button recalc2vs2Button = new Button("2 vs 2 Elo neu berechnen", e -> {
|
||||||
Notification.show("Recalculating Elo").addThemeVariants(NotificationVariant.LUMO_WARNING);
|
Notification.show("Recalculating Elo").addThemeVariants(NotificationVariant.LUMO_WARNING);
|
||||||
service.recalculateAll2vs2();
|
service.recalculateAll2vs2();
|
||||||
|
|||||||
@@ -1,5 +1,10 @@
|
|||||||
package org.kickerelo.kickerelo.views;
|
package org.kickerelo.kickerelo.views;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
import org.kickerelo.kickerelo.data.Spieler;
|
||||||
|
import org.kickerelo.kickerelo.util.Spieler1vs1EloComparator;
|
||||||
|
|
||||||
import com.github.appreciated.apexcharts.ApexChartsBuilder;
|
import com.github.appreciated.apexcharts.ApexChartsBuilder;
|
||||||
import com.github.appreciated.apexcharts.config.Theme;
|
import com.github.appreciated.apexcharts.config.Theme;
|
||||||
import com.github.appreciated.apexcharts.config.builder.ChartBuilder;
|
import com.github.appreciated.apexcharts.config.builder.ChartBuilder;
|
||||||
@@ -11,19 +16,8 @@ import com.github.appreciated.apexcharts.config.chart.zoom.ZoomType;
|
|||||||
import com.github.appreciated.apexcharts.config.theme.Mode;
|
import com.github.appreciated.apexcharts.config.theme.Mode;
|
||||||
import com.github.appreciated.apexcharts.config.theme.Monochrome;
|
import com.github.appreciated.apexcharts.config.theme.Monochrome;
|
||||||
import com.github.appreciated.apexcharts.config.xaxis.Labels;
|
import com.github.appreciated.apexcharts.config.xaxis.Labels;
|
||||||
import com.github.appreciated.apexcharts.config.xaxis.labels.Style;
|
|
||||||
import com.github.appreciated.apexcharts.config.yaxis.Title;
|
|
||||||
import com.github.appreciated.apexcharts.helper.Series;
|
import com.github.appreciated.apexcharts.helper.Series;
|
||||||
import com.vaadin.flow.component.UI;
|
|
||||||
import com.vaadin.flow.component.button.Button;
|
|
||||||
import com.vaadin.flow.router.Route;
|
import com.vaadin.flow.router.Route;
|
||||||
import com.vaadin.flow.server.VaadinService;
|
|
||||||
import com.vaadin.flow.theme.lumo.Lumo;
|
|
||||||
import org.kickerelo.kickerelo.data.Spieler;
|
|
||||||
import org.kickerelo.kickerelo.util.Spieler1vs1EloComparator;
|
|
||||||
|
|
||||||
import java.math.BigDecimal;
|
|
||||||
import java.util.List;
|
|
||||||
|
|
||||||
@Route(value = "app/chart1vs1")
|
@Route(value = "app/chart1vs1")
|
||||||
public class Chart1vs1 extends ApexChartsBuilder {
|
public class Chart1vs1 extends ApexChartsBuilder {
|
||||||
|
|||||||
@@ -1,5 +1,10 @@
|
|||||||
package org.kickerelo.kickerelo.views;
|
package org.kickerelo.kickerelo.views;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
import org.kickerelo.kickerelo.data.Spieler;
|
||||||
|
import org.kickerelo.kickerelo.util.Spieler2vs2EloComparator;
|
||||||
|
|
||||||
import com.github.appreciated.apexcharts.ApexChartsBuilder;
|
import com.github.appreciated.apexcharts.ApexChartsBuilder;
|
||||||
import com.github.appreciated.apexcharts.config.Theme;
|
import com.github.appreciated.apexcharts.config.Theme;
|
||||||
import com.github.appreciated.apexcharts.config.builder.ChartBuilder;
|
import com.github.appreciated.apexcharts.config.builder.ChartBuilder;
|
||||||
@@ -14,12 +19,7 @@ import com.github.appreciated.apexcharts.config.xaxis.Labels;
|
|||||||
import com.github.appreciated.apexcharts.helper.Series;
|
import com.github.appreciated.apexcharts.helper.Series;
|
||||||
import com.vaadin.flow.router.Route;
|
import com.vaadin.flow.router.Route;
|
||||||
|
|
||||||
import org.kickerelo.kickerelo.data.Spieler;
|
@Route(value = "app/chart2vs2")
|
||||||
import org.kickerelo.kickerelo.util.Spieler2vs2EloComparator;
|
|
||||||
|
|
||||||
import java.util.List;
|
|
||||||
|
|
||||||
@Route(value = "app/chart1vs1")
|
|
||||||
public class Chart2vs2 extends ApexChartsBuilder {
|
public class Chart2vs2 extends ApexChartsBuilder {
|
||||||
public Chart2vs2(List<Spieler> l) {
|
public Chart2vs2(List<Spieler> l) {
|
||||||
Theme theme = new Theme();
|
Theme theme = new Theme();
|
||||||
|
|||||||
@@ -1,5 +1,11 @@
|
|||||||
package org.kickerelo.kickerelo.views;
|
package org.kickerelo.kickerelo.views;
|
||||||
|
|
||||||
|
import org.kickerelo.kickerelo.exception.DuplicatePlayerException;
|
||||||
|
import org.kickerelo.kickerelo.exception.InvalidDataException;
|
||||||
|
import org.kickerelo.kickerelo.exception.NoSuchPlayerException;
|
||||||
|
import org.kickerelo.kickerelo.exception.PlayerNameNotSetException;
|
||||||
|
import org.kickerelo.kickerelo.service.KickerEloService;
|
||||||
|
|
||||||
import com.vaadin.flow.component.button.Button;
|
import com.vaadin.flow.component.button.Button;
|
||||||
import com.vaadin.flow.component.combobox.ComboBox;
|
import com.vaadin.flow.component.combobox.ComboBox;
|
||||||
import com.vaadin.flow.component.html.H2;
|
import com.vaadin.flow.component.html.H2;
|
||||||
@@ -8,11 +14,6 @@ import com.vaadin.flow.component.notification.NotificationVariant;
|
|||||||
import com.vaadin.flow.component.orderedlayout.VerticalLayout;
|
import com.vaadin.flow.component.orderedlayout.VerticalLayout;
|
||||||
import com.vaadin.flow.component.textfield.IntegerField;
|
import com.vaadin.flow.component.textfield.IntegerField;
|
||||||
import com.vaadin.flow.router.Route;
|
import com.vaadin.flow.router.Route;
|
||||||
import org.kickerelo.kickerelo.exception.DuplicatePlayerException;
|
|
||||||
import org.kickerelo.kickerelo.exception.InvalidDataException;
|
|
||||||
import org.kickerelo.kickerelo.exception.NoSuchPlayerException;
|
|
||||||
import org.kickerelo.kickerelo.exception.PlayerNameNotSetException;
|
|
||||||
import org.kickerelo.kickerelo.service.KickerEloService;
|
|
||||||
|
|
||||||
@Route(value = "app/enter1vs1")
|
@Route(value = "app/enter1vs1")
|
||||||
public class Enter1vs1View extends VerticalLayout {
|
public class Enter1vs1View extends VerticalLayout {
|
||||||
|
|||||||
@@ -1,5 +1,11 @@
|
|||||||
package org.kickerelo.kickerelo.views;
|
package org.kickerelo.kickerelo.views;
|
||||||
|
|
||||||
|
import org.kickerelo.kickerelo.exception.DuplicatePlayerException;
|
||||||
|
import org.kickerelo.kickerelo.exception.InvalidDataException;
|
||||||
|
import org.kickerelo.kickerelo.exception.NoSuchPlayerException;
|
||||||
|
import org.kickerelo.kickerelo.exception.PlayerNameNotSetException;
|
||||||
|
import org.kickerelo.kickerelo.service.KickerEloService;
|
||||||
|
|
||||||
import com.vaadin.flow.component.button.Button;
|
import com.vaadin.flow.component.button.Button;
|
||||||
import com.vaadin.flow.component.combobox.ComboBox;
|
import com.vaadin.flow.component.combobox.ComboBox;
|
||||||
import com.vaadin.flow.component.html.H2;
|
import com.vaadin.flow.component.html.H2;
|
||||||
@@ -8,11 +14,6 @@ import com.vaadin.flow.component.notification.NotificationVariant;
|
|||||||
import com.vaadin.flow.component.orderedlayout.VerticalLayout;
|
import com.vaadin.flow.component.orderedlayout.VerticalLayout;
|
||||||
import com.vaadin.flow.component.textfield.IntegerField;
|
import com.vaadin.flow.component.textfield.IntegerField;
|
||||||
import com.vaadin.flow.router.Route;
|
import com.vaadin.flow.router.Route;
|
||||||
import org.kickerelo.kickerelo.exception.DuplicatePlayerException;
|
|
||||||
import org.kickerelo.kickerelo.exception.InvalidDataException;
|
|
||||||
import org.kickerelo.kickerelo.exception.NoSuchPlayerException;
|
|
||||||
import org.kickerelo.kickerelo.exception.PlayerNameNotSetException;
|
|
||||||
import org.kickerelo.kickerelo.service.KickerEloService;
|
|
||||||
|
|
||||||
@Route(value = "app/enter2vs2")
|
@Route(value = "app/enter2vs2")
|
||||||
public class Enter2vs2View extends VerticalLayout {
|
public class Enter2vs2View extends VerticalLayout {
|
||||||
|
|||||||
@@ -1,11 +1,12 @@
|
|||||||
package org.kickerelo.kickerelo.views;
|
package org.kickerelo.kickerelo.views;
|
||||||
|
|
||||||
|
import org.kickerelo.kickerelo.repository.SpielerRepository;
|
||||||
|
|
||||||
import com.github.appreciated.apexcharts.ApexCharts;
|
import com.github.appreciated.apexcharts.ApexCharts;
|
||||||
import com.vaadin.flow.component.Unit;
|
import com.vaadin.flow.component.Unit;
|
||||||
import com.vaadin.flow.component.html.H2;
|
import com.vaadin.flow.component.html.H2;
|
||||||
import com.vaadin.flow.component.orderedlayout.VerticalLayout;
|
import com.vaadin.flow.component.orderedlayout.VerticalLayout;
|
||||||
import com.vaadin.flow.router.Route;
|
import com.vaadin.flow.router.Route;
|
||||||
import org.kickerelo.kickerelo.repository.SpielerRepository;
|
|
||||||
|
|
||||||
@Route("app/graph1vs1")
|
@Route("app/graph1vs1")
|
||||||
public class Graph1vs1View extends VerticalLayout {
|
public class Graph1vs1View extends VerticalLayout {
|
||||||
|
|||||||
@@ -1,11 +1,12 @@
|
|||||||
package org.kickerelo.kickerelo.views;
|
package org.kickerelo.kickerelo.views;
|
||||||
|
|
||||||
|
import org.kickerelo.kickerelo.repository.SpielerRepository;
|
||||||
|
|
||||||
import com.github.appreciated.apexcharts.ApexCharts;
|
import com.github.appreciated.apexcharts.ApexCharts;
|
||||||
import com.vaadin.flow.component.Unit;
|
import com.vaadin.flow.component.Unit;
|
||||||
import com.vaadin.flow.component.html.H2;
|
import com.vaadin.flow.component.html.H2;
|
||||||
import com.vaadin.flow.component.orderedlayout.VerticalLayout;
|
import com.vaadin.flow.component.orderedlayout.VerticalLayout;
|
||||||
import com.vaadin.flow.router.Route;
|
import com.vaadin.flow.router.Route;
|
||||||
import org.kickerelo.kickerelo.repository.SpielerRepository;
|
|
||||||
|
|
||||||
@Route("app/graph2vs2")
|
@Route("app/graph2vs2")
|
||||||
public class Graph2vs2View extends VerticalLayout {
|
public class Graph2vs2View extends VerticalLayout {
|
||||||
|
|||||||
@@ -1,5 +1,10 @@
|
|||||||
package org.kickerelo.kickerelo.views;
|
package org.kickerelo.kickerelo.views;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
import org.kickerelo.kickerelo.data.Ergebnis1vs1;
|
||||||
|
import org.kickerelo.kickerelo.repository.Ergebnis1vs1Repository;
|
||||||
|
|
||||||
import com.vaadin.flow.component.grid.Grid;
|
import com.vaadin.flow.component.grid.Grid;
|
||||||
import com.vaadin.flow.component.grid.GridSortOrder;
|
import com.vaadin.flow.component.grid.GridSortOrder;
|
||||||
import com.vaadin.flow.component.grid.dataview.GridListDataView;
|
import com.vaadin.flow.component.grid.dataview.GridListDataView;
|
||||||
@@ -13,10 +18,6 @@ import com.vaadin.flow.data.provider.SortDirection;
|
|||||||
import com.vaadin.flow.data.renderer.LocalDateTimeRenderer;
|
import com.vaadin.flow.data.renderer.LocalDateTimeRenderer;
|
||||||
import com.vaadin.flow.data.value.ValueChangeMode;
|
import com.vaadin.flow.data.value.ValueChangeMode;
|
||||||
import com.vaadin.flow.router.Route;
|
import com.vaadin.flow.router.Route;
|
||||||
import org.kickerelo.kickerelo.data.Ergebnis1vs1;
|
|
||||||
import org.kickerelo.kickerelo.repository.Ergebnis1vs1Repository;
|
|
||||||
|
|
||||||
import java.util.List;
|
|
||||||
|
|
||||||
@Route("app/history1vs1")
|
@Route("app/history1vs1")
|
||||||
public class History1vs1View extends VerticalLayout {
|
public class History1vs1View extends VerticalLayout {
|
||||||
|
|||||||
@@ -1,5 +1,10 @@
|
|||||||
package org.kickerelo.kickerelo.views;
|
package org.kickerelo.kickerelo.views;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
import org.kickerelo.kickerelo.data.Ergebnis2vs2;
|
||||||
|
import org.kickerelo.kickerelo.repository.Ergebnis2vs2Repository;
|
||||||
|
|
||||||
import com.vaadin.flow.component.grid.Grid;
|
import com.vaadin.flow.component.grid.Grid;
|
||||||
import com.vaadin.flow.component.grid.GridSortOrder;
|
import com.vaadin.flow.component.grid.GridSortOrder;
|
||||||
import com.vaadin.flow.component.grid.dataview.GridListDataView;
|
import com.vaadin.flow.component.grid.dataview.GridListDataView;
|
||||||
@@ -14,10 +19,6 @@ import com.vaadin.flow.data.provider.SortDirection;
|
|||||||
import com.vaadin.flow.data.renderer.LocalDateTimeRenderer;
|
import com.vaadin.flow.data.renderer.LocalDateTimeRenderer;
|
||||||
import com.vaadin.flow.data.value.ValueChangeMode;
|
import com.vaadin.flow.data.value.ValueChangeMode;
|
||||||
import com.vaadin.flow.router.Route;
|
import com.vaadin.flow.router.Route;
|
||||||
import org.kickerelo.kickerelo.data.Ergebnis2vs2;
|
|
||||||
import org.kickerelo.kickerelo.repository.Ergebnis2vs2Repository;
|
|
||||||
|
|
||||||
import java.util.List;
|
|
||||||
|
|
||||||
@Route("app/history2vs2")
|
@Route("app/history2vs2")
|
||||||
public class History2vs2View extends VerticalLayout {
|
public class History2vs2View extends VerticalLayout {
|
||||||
|
|||||||
@@ -1,15 +1,16 @@
|
|||||||
package org.kickerelo.kickerelo.views;
|
package org.kickerelo.kickerelo.views;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
import org.kickerelo.kickerelo.data.Spieler;
|
||||||
|
import org.kickerelo.kickerelo.service.KickerEloService;
|
||||||
|
|
||||||
import com.vaadin.flow.component.grid.Grid;
|
import com.vaadin.flow.component.grid.Grid;
|
||||||
import com.vaadin.flow.component.grid.GridSortOrder;
|
import com.vaadin.flow.component.grid.GridSortOrder;
|
||||||
import com.vaadin.flow.component.html.H2;
|
import com.vaadin.flow.component.html.H2;
|
||||||
import com.vaadin.flow.component.orderedlayout.VerticalLayout;
|
import com.vaadin.flow.component.orderedlayout.VerticalLayout;
|
||||||
import com.vaadin.flow.data.provider.SortDirection;
|
import com.vaadin.flow.data.provider.SortDirection;
|
||||||
import com.vaadin.flow.router.Route;
|
import com.vaadin.flow.router.Route;
|
||||||
import org.kickerelo.kickerelo.data.Spieler;
|
|
||||||
import org.kickerelo.kickerelo.service.KickerEloService;
|
|
||||||
|
|
||||||
import java.util.List;
|
|
||||||
|
|
||||||
@Route("app")
|
@Route("app")
|
||||||
public class PlayerListView extends VerticalLayout {
|
public class PlayerListView extends VerticalLayout {
|
||||||
|
|||||||
@@ -1,5 +1,10 @@
|
|||||||
package org.kickerelo.kickerelo.views;
|
package org.kickerelo.kickerelo.views;
|
||||||
|
|
||||||
|
import org.kickerelo.kickerelo.data.Spieler;
|
||||||
|
import org.kickerelo.kickerelo.service.KickerEloService;
|
||||||
|
import org.kickerelo.kickerelo.service.Stat2vs2Service;
|
||||||
|
import org.kickerelo.kickerelo.util.Position;
|
||||||
|
|
||||||
import com.vaadin.flow.component.combobox.ComboBox;
|
import com.vaadin.flow.component.combobox.ComboBox;
|
||||||
import com.vaadin.flow.component.html.H2;
|
import com.vaadin.flow.component.html.H2;
|
||||||
import com.vaadin.flow.component.html.NativeLabel;
|
import com.vaadin.flow.component.html.NativeLabel;
|
||||||
@@ -7,10 +12,6 @@ import com.vaadin.flow.component.orderedlayout.VerticalLayout;
|
|||||||
import com.vaadin.flow.component.progressbar.ProgressBar;
|
import com.vaadin.flow.component.progressbar.ProgressBar;
|
||||||
import com.vaadin.flow.component.progressbar.ProgressBarVariant;
|
import com.vaadin.flow.component.progressbar.ProgressBarVariant;
|
||||||
import com.vaadin.flow.router.Route;
|
import com.vaadin.flow.router.Route;
|
||||||
import org.kickerelo.kickerelo.data.Spieler;
|
|
||||||
import org.kickerelo.kickerelo.service.KickerEloService;
|
|
||||||
import org.kickerelo.kickerelo.service.Stat2vs2Service;
|
|
||||||
import org.kickerelo.kickerelo.util.Position;
|
|
||||||
|
|
||||||
@Route("app/stat2vs2")
|
@Route("app/stat2vs2")
|
||||||
public class Stat2vs2View extends VerticalLayout {
|
public class Stat2vs2View extends VerticalLayout {
|
||||||
|
|||||||
@@ -17,4 +17,4 @@ 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.registration.oidc.redirect-uri={baseUrl}/login/oauth2/code/{registrationId}
|
||||||
spring.security.oauth2.client.provider.oidc.issuer-uri=${OIDC_ISSUER_URI}
|
spring.security.oauth2.client.provider.oidc.issuer-uri=${OIDC_ISSUER_URI}
|
||||||
|
|
||||||
vaadin.urlMapping=/*
|
vaadin.urlMapping=/app/*
|
||||||
|
|||||||
@@ -13,8 +13,9 @@ spring.jpa.show-sql=true
|
|||||||
# == OIDC Configuration ==
|
# == OIDC Configuration ==
|
||||||
spring.security.oauth2.client.registration.oidc.client-id=${OIDC_CLIENT_ID}
|
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.client-secret=${OIDC_CLIENT_SECRET}
|
||||||
spring.security.oauth2.client.registration.oidc.scope=openid,profile,email
|
spring.security.oauth2.client.registration.oidc.scope=openid,email,profile
|
||||||
spring.security.oauth2.client.registration.oidc.redirect-uri={baseUrl}/login/oauth2/code/{registrationId}
|
spring.security.oauth2.client.registration.oidc.redirect-uri=${OIDC_REDIRECT_URI}
|
||||||
|
spring.security.oauth2.client.provider.oidc.jwk-set-uri=${OIDC_JWK_SET_URI}
|
||||||
spring.security.oauth2.client.provider.oidc.issuer-uri=${OIDC_ISSUER_URI}
|
spring.security.oauth2.client.provider.oidc.issuer-uri=${OIDC_ISSUER_URI}
|
||||||
|
|
||||||
vaadin.urlMapping=/app/*
|
vaadin.urlMapping=/app/*
|
||||||
|
|||||||
Reference in New Issue
Block a user