Compare commits
18 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
60ec7de366 | ||
| 4a6598f102 | |||
|
|
b278f755b4 | ||
| 23cdbe9bd1 | |||
|
|
416baebab5 | ||
| 2f38855449 | |||
|
|
1a3cb5044f | ||
| 861f2f1184 | |||
|
|
773b760bc1 | ||
| b729344d1e | |||
|
|
9a194a9fd7 | ||
| fccd94cc11 | |||
|
|
27da1327c1 | ||
| 82a9706deb | |||
|
|
6479f68b6c | ||
| 4f52c1a0f3 | |||
|
|
3787e0f3ed | ||
| 45dec00b86 |
45
CHANGELOG.md
45
CHANGELOG.md
@@ -393,3 +393,48 @@
|
|||||||
### Features
|
### Features
|
||||||
|
|
||||||
* Integrate UserManager and HibernateUserManager in session management ([e32f4eb](https://git.janis-eccarius.de/KnockOutWhist/KnockOutWhist-Web/commit/e32f4eb8fff9daec46f20284e28e94a59231d033))
|
* Integrate UserManager and HibernateUserManager in session management ([e32f4eb](https://git.janis-eccarius.de/KnockOutWhist/KnockOutWhist-Web/commit/e32f4eb8fff9daec46f20284e28e94a59231d033))
|
||||||
|
## (2026-01-20)
|
||||||
|
|
||||||
|
### Features
|
||||||
|
|
||||||
|
* Implement transaction management for user addition and removal in HibernateUserManager ([45dec00](https://git.janis-eccarius.de/KnockOutWhist/KnockOutWhist-Web/commit/45dec00b86a1395457226ed62ac319c61e38739a))
|
||||||
|
## (2026-01-20)
|
||||||
|
|
||||||
|
### Features
|
||||||
|
|
||||||
|
* Add mainRoute configuration for OpenID in application and environment files ([4f52c1a](https://git.janis-eccarius.de/KnockOutWhist/KnockOutWhist-Web/commit/4f52c1a0f30cf0b917452149a52b53b94d82a7c9))
|
||||||
|
## (2026-01-20)
|
||||||
|
|
||||||
|
### Features
|
||||||
|
|
||||||
|
* Simplify authorization request creation in OpenIDConnectService and use environment variables for Keycloak configuration ([82a9706](https://git.janis-eccarius.de/KnockOutWhist/KnockOutWhist-Web/commit/82a9706deb97db193015e55a048830d496e76d83))
|
||||||
|
## (2026-01-20)
|
||||||
|
|
||||||
|
### Features
|
||||||
|
|
||||||
|
* Use environment variables for Keycloak client configuration in staging ([fccd94c](https://git.janis-eccarius.de/KnockOutWhist/KnockOutWhist-Web/commit/fccd94cc11db43f99eded13207cc93fb59d8703e))
|
||||||
|
## (2026-01-20)
|
||||||
|
|
||||||
|
### Features
|
||||||
|
|
||||||
|
* Add logging for OpenID authentication process in OpenIDController ([b729344](https://git.janis-eccarius.de/KnockOutWhist/KnockOutWhist-Web/commit/b729344d1e79c631146dd988248d033d97e12d93))
|
||||||
|
## (2026-01-20)
|
||||||
|
|
||||||
|
### Features
|
||||||
|
|
||||||
|
* Add error logging for user info retrieval in OpenIDConnectService ([861f2f1](https://git.janis-eccarius.de/KnockOutWhist/KnockOutWhist-Web/commit/861f2f1184e860fdd164481167f941c11accfedd))
|
||||||
|
## (2026-01-20)
|
||||||
|
|
||||||
|
### Features
|
||||||
|
|
||||||
|
* Add idClaimName parameter to OpenIDConnectService for flexible ID claim mapping ([2f38855](https://git.janis-eccarius.de/KnockOutWhist/KnockOutWhist-Web/commit/2f388554495d8bd44b4c533baa0f2fc27eea22c2))
|
||||||
|
## (2026-01-21)
|
||||||
|
|
||||||
|
### Features
|
||||||
|
|
||||||
|
* Change log level to warn for OpenID callback in OpenIDController ([23cdbe9](https://git.janis-eccarius.de/KnockOutWhist/KnockOutWhist-Web/commit/23cdbe9bd127bc26405fd216372bbb2d7e718a77))
|
||||||
|
## (2026-01-21)
|
||||||
|
|
||||||
|
### Features
|
||||||
|
|
||||||
|
* Change log level to warn for OpenID callback in OpenIDController ([4a6598f](https://git.janis-eccarius.de/KnockOutWhist/KnockOutWhist-Web/commit/4a6598f102d8934c7502944a0addd400dd0cbcac))
|
||||||
|
|||||||
Submodule knockoutwhistfrontend updated: c2dfa0e701...65591ad392
@@ -2,7 +2,7 @@ package controllers
|
|||||||
|
|
||||||
import logic.user.{SessionManager, UserManager}
|
import logic.user.{SessionManager, UserManager}
|
||||||
import model.users.User
|
import model.users.User
|
||||||
import play.api.Configuration
|
import play.api.{Configuration, Logger}
|
||||||
import play.api.libs.json.Json
|
import play.api.libs.json.Json
|
||||||
import play.api.mvc.*
|
import play.api.mvc.*
|
||||||
import play.api.mvc.Cookie.SameSite.Lax
|
import play.api.mvc.Cookie.SameSite.Lax
|
||||||
@@ -20,6 +20,8 @@ class OpenIDController @Inject()(
|
|||||||
val config: Configuration
|
val config: Configuration
|
||||||
)(implicit ec: ExecutionContext) extends BaseController {
|
)(implicit ec: ExecutionContext) extends BaseController {
|
||||||
|
|
||||||
|
private val logger = Logger(this.getClass)
|
||||||
|
|
||||||
def loginWithProvider(provider: String): Action[AnyContent] = Action.async { implicit request =>
|
def loginWithProvider(provider: String): Action[AnyContent] = Action.async { implicit request =>
|
||||||
val state = openIDService.generateState()
|
val state = openIDService.generateState()
|
||||||
val nonce = openIDService.generateNonce()
|
val nonce = openIDService.generateNonce()
|
||||||
@@ -47,8 +49,11 @@ class OpenIDController @Inject()(
|
|||||||
val code = request.getQueryString("code")
|
val code = request.getQueryString("code")
|
||||||
val error = request.getQueryString("error")
|
val error = request.getQueryString("error")
|
||||||
|
|
||||||
|
logger.warn(s"Received callback from $provider with state $sessionState, nonce $sessionNonce, provider $sessionProvider, returned state $returnedState, code $code, error $error")
|
||||||
|
|
||||||
error match {
|
error match {
|
||||||
case Some(err) =>
|
case Some(err) =>
|
||||||
|
logger.error(s"Authentication failed: $err")
|
||||||
Future.successful(Redirect("/login").flashing("error" -> s"Authentication failed: $err"))
|
Future.successful(Redirect("/login").flashing("error" -> s"Authentication failed: $err"))
|
||||||
case None =>
|
case None =>
|
||||||
(for {
|
(for {
|
||||||
@@ -56,24 +61,46 @@ class OpenIDController @Inject()(
|
|||||||
_ <- Option(sessionProvider.contains(provider))
|
_ <- Option(sessionProvider.contains(provider))
|
||||||
authCode <- code
|
authCode <- code
|
||||||
} yield {
|
} yield {
|
||||||
|
logger.warn(s"Authentication successful for $provider")
|
||||||
openIDService.exchangeCodeForTokens(provider, authCode, sessionState.get).flatMap {
|
openIDService.exchangeCodeForTokens(provider, authCode, sessionState.get).flatMap {
|
||||||
case Some(tokenResponse) =>
|
case Some(tokenResponse) =>
|
||||||
openIDService.getUserInfo(provider, tokenResponse.accessToken).map {
|
openIDService.getUserInfo(provider, tokenResponse.accessToken).flatMap {
|
||||||
case Some(userInfo) =>
|
case Some(userInfo) =>
|
||||||
// Store user info in session for username selection
|
// Check if user already exists
|
||||||
Redirect(config.get[String]("openid.selectUserRoute"))
|
userManager.authenticateOpenID(provider, userInfo.id) match {
|
||||||
.withSession(
|
case Some(user) =>
|
||||||
"oauth_user_info" -> Json.toJson(userInfo).toString(),
|
logger.warn(s"User ${userInfo.name} (${userInfo.id}) already exists, logging them in")
|
||||||
"oauth_provider" -> provider,
|
// User already exists, log them in
|
||||||
"oauth_access_token" -> tokenResponse.accessToken
|
val sessionToken = sessionManager.createSession(user)
|
||||||
)
|
Future.successful(Redirect(config.getOptional[String]("openid.mainRoute").getOrElse("/"))
|
||||||
|
.withCookies(Cookie(
|
||||||
|
name = "accessToken",
|
||||||
|
value = sessionToken,
|
||||||
|
httpOnly = true,
|
||||||
|
secure = false,
|
||||||
|
sameSite = Some(Lax)
|
||||||
|
))
|
||||||
|
.removingFromSession("oauth_state", "oauth_nonce", "oauth_provider", "oauth_access_token"))
|
||||||
|
case None =>
|
||||||
|
logger.warn(s"User ${userInfo.name} (${userInfo.id}) not found, creating new user")
|
||||||
|
// New user, redirect to username selection
|
||||||
|
Future.successful(Redirect(config.get[String]("openid.selectUserRoute"))
|
||||||
|
.withSession(
|
||||||
|
"oauth_user_info" -> Json.toJson(userInfo).toString(),
|
||||||
|
"oauth_provider" -> provider,
|
||||||
|
"oauth_access_token" -> tokenResponse.accessToken
|
||||||
|
))
|
||||||
|
}
|
||||||
case None =>
|
case None =>
|
||||||
Redirect("/login").flashing("error" -> "Failed to retrieve user information")
|
logger.error("Failed to retrieve user information")
|
||||||
|
Future.successful(Redirect("/login").flashing("error" -> "Failed to retrieve user information"))
|
||||||
}
|
}
|
||||||
case None =>
|
case None =>
|
||||||
|
logger.error("Failed to exchange authorization code")
|
||||||
Future.successful(Redirect("/login").flashing("error" -> "Failed to exchange authorization code"))
|
Future.successful(Redirect("/login").flashing("error" -> "Failed to exchange authorization code"))
|
||||||
}
|
}
|
||||||
}).getOrElse {
|
}).getOrElse {
|
||||||
|
logger.error("Invalid state parameter")
|
||||||
Future.successful(Redirect("/login").flashing("error" -> "Invalid state parameter"))
|
Future.successful(Redirect("/login").flashing("error" -> "Invalid state parameter"))
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -18,7 +18,9 @@ class HibernateUserManager @Inject()(em: EntityManager, config: Config) extends
|
|||||||
private val logger = Logger(getClass.getName)
|
private val logger = Logger(getClass.getName)
|
||||||
|
|
||||||
override def addUser(name: String, password: String): Boolean = {
|
override def addUser(name: String, password: String): Boolean = {
|
||||||
|
val tx = em.getTransaction
|
||||||
try {
|
try {
|
||||||
|
tx.begin()
|
||||||
// Check if user already exists
|
// Check if user already exists
|
||||||
val existing = em.createQuery("SELECT u FROM UserEntity u WHERE u.username = :username", classOf[UserEntity])
|
val existing = em.createQuery("SELECT u FROM UserEntity u WHERE u.username = :username", classOf[UserEntity])
|
||||||
.setParameter("username", name)
|
.setParameter("username", name)
|
||||||
@@ -26,6 +28,7 @@ class HibernateUserManager @Inject()(em: EntityManager, config: Config) extends
|
|||||||
|
|
||||||
if (!existing.isEmpty) {
|
if (!existing.isEmpty) {
|
||||||
logger.warn(s"User $name already exists")
|
logger.warn(s"User $name already exists")
|
||||||
|
tx.rollback()
|
||||||
return false
|
return false
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -39,10 +42,12 @@ class HibernateUserManager @Inject()(em: EntityManager, config: Config) extends
|
|||||||
|
|
||||||
em.persist(userEntity)
|
em.persist(userEntity)
|
||||||
em.flush()
|
em.flush()
|
||||||
|
tx.commit()
|
||||||
|
|
||||||
true
|
true
|
||||||
} catch {
|
} catch {
|
||||||
case e: Exception => {
|
case e: Exception => {
|
||||||
|
if (tx.isActive) tx.rollback()
|
||||||
logger.error(s"Error adding user $name", e)
|
logger.error(s"Error adding user $name", e)
|
||||||
false
|
false
|
||||||
}
|
}
|
||||||
@@ -50,7 +55,9 @@ class HibernateUserManager @Inject()(em: EntityManager, config: Config) extends
|
|||||||
}
|
}
|
||||||
|
|
||||||
override def addOpenIDUser(name: String, userInfo: OpenIDUserInfo): Boolean = {
|
override def addOpenIDUser(name: String, userInfo: OpenIDUserInfo): Boolean = {
|
||||||
|
val tx = em.getTransaction
|
||||||
try {
|
try {
|
||||||
|
tx.begin()
|
||||||
// Check if user already exists
|
// Check if user already exists
|
||||||
val existing = em.createQuery("SELECT u FROM UserEntity u WHERE u.username = :username", classOf[UserEntity])
|
val existing = em.createQuery("SELECT u FROM UserEntity u WHERE u.username = :username", classOf[UserEntity])
|
||||||
.setParameter("username", name)
|
.setParameter("username", name)
|
||||||
@@ -58,6 +65,7 @@ class HibernateUserManager @Inject()(em: EntityManager, config: Config) extends
|
|||||||
|
|
||||||
if (!existing.isEmpty) {
|
if (!existing.isEmpty) {
|
||||||
logger.warn(s"User $name already exists")
|
logger.warn(s"User $name already exists")
|
||||||
|
tx.rollback()
|
||||||
return false
|
return false
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -72,6 +80,7 @@ class HibernateUserManager @Inject()(em: EntityManager, config: Config) extends
|
|||||||
|
|
||||||
if (!existingOpenID.isEmpty) {
|
if (!existingOpenID.isEmpty) {
|
||||||
logger.warn(s"OpenID user ${userInfo.provider}_${userInfo.id} already exists")
|
logger.warn(s"OpenID user ${userInfo.provider}_${userInfo.id} already exists")
|
||||||
|
tx.rollback()
|
||||||
return false
|
return false
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -80,9 +89,11 @@ class HibernateUserManager @Inject()(em: EntityManager, config: Config) extends
|
|||||||
|
|
||||||
em.persist(userEntity)
|
em.persist(userEntity)
|
||||||
em.flush()
|
em.flush()
|
||||||
|
tx.commit()
|
||||||
true
|
true
|
||||||
} catch {
|
} catch {
|
||||||
case e: Exception => {
|
case e: Exception => {
|
||||||
|
if (tx.isActive) tx.rollback()
|
||||||
logger.error(s"Error adding OpenID user ${userInfo.provider}_${userInfo.id}", e)
|
logger.error(s"Error adding OpenID user ${userInfo.provider}_${userInfo.id}", e)
|
||||||
false
|
false
|
||||||
}
|
}
|
||||||
@@ -167,20 +178,27 @@ class HibernateUserManager @Inject()(em: EntityManager, config: Config) extends
|
|||||||
}
|
}
|
||||||
|
|
||||||
override def removeUser(name: String): Boolean = {
|
override def removeUser(name: String): Boolean = {
|
||||||
|
val tx = em.getTransaction
|
||||||
try {
|
try {
|
||||||
|
tx.begin()
|
||||||
val users = em.createQuery("SELECT u FROM UserEntity u WHERE u.username = :username", classOf[UserEntity])
|
val users = em.createQuery("SELECT u FROM UserEntity u WHERE u.username = :username", classOf[UserEntity])
|
||||||
.setParameter("username", name)
|
.setParameter("username", name)
|
||||||
.getResultList
|
.getResultList
|
||||||
|
|
||||||
if (users.isEmpty) {
|
if (users.isEmpty) {
|
||||||
|
tx.rollback()
|
||||||
false
|
false
|
||||||
} else {
|
} else {
|
||||||
em.remove(users.get(0))
|
em.remove(users.get(0))
|
||||||
em.flush()
|
em.flush()
|
||||||
|
tx.commit()
|
||||||
true
|
true
|
||||||
}
|
}
|
||||||
} catch {
|
} catch {
|
||||||
case _: Exception => false
|
case _: Exception => {
|
||||||
|
if (tx.isActive) tx.rollback()
|
||||||
|
false
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -2,7 +2,7 @@ package services
|
|||||||
|
|
||||||
import com.typesafe.config.Config
|
import com.typesafe.config.Config
|
||||||
import play.api.libs.ws.WSClient
|
import play.api.libs.ws.WSClient
|
||||||
import play.api.Configuration
|
import play.api.{Configuration, Logger}
|
||||||
import play.api.libs.json.*
|
import play.api.libs.json.*
|
||||||
|
|
||||||
import java.net.URI
|
import java.net.URI
|
||||||
@@ -11,7 +11,6 @@ import scala.concurrent.{ExecutionContext, Future}
|
|||||||
import com.nimbusds.oauth2.sdk.*
|
import com.nimbusds.oauth2.sdk.*
|
||||||
import com.nimbusds.oauth2.sdk.id.*
|
import com.nimbusds.oauth2.sdk.id.*
|
||||||
import com.nimbusds.openid.connect.sdk.*
|
import com.nimbusds.openid.connect.sdk.*
|
||||||
|
|
||||||
import play.api.libs.ws.DefaultBodyWritables.*
|
import play.api.libs.ws.DefaultBodyWritables.*
|
||||||
|
|
||||||
case class OpenIDUserInfo(
|
case class OpenIDUserInfo(
|
||||||
@@ -36,7 +35,8 @@ case class OpenIDProvider(
|
|||||||
authorizationEndpoint: String,
|
authorizationEndpoint: String,
|
||||||
tokenEndpoint: String,
|
tokenEndpoint: String,
|
||||||
userInfoEndpoint: String,
|
userInfoEndpoint: String,
|
||||||
scopes: Set[String] = Set("openid", "profile", "email")
|
scopes: Set[String] = Set("openid", "profile", "email"),
|
||||||
|
idClaimName: String = "id"
|
||||||
)
|
)
|
||||||
|
|
||||||
case class TokenResponse(
|
case class TokenResponse(
|
||||||
@@ -50,6 +50,8 @@ case class TokenResponse(
|
|||||||
@Singleton
|
@Singleton
|
||||||
class OpenIDConnectService@Inject(ws: WSClient, config: Configuration)(implicit ec: ExecutionContext) {
|
class OpenIDConnectService@Inject(ws: WSClient, config: Configuration)(implicit ec: ExecutionContext) {
|
||||||
|
|
||||||
|
private val logger = Logger(this.getClass)
|
||||||
|
|
||||||
private val providers = Map(
|
private val providers = Map(
|
||||||
"discord" -> OpenIDProvider(
|
"discord" -> OpenIDProvider(
|
||||||
name = "Discord",
|
name = "Discord",
|
||||||
@@ -69,36 +71,22 @@ class OpenIDConnectService@Inject(ws: WSClient, config: Configuration)(implicit
|
|||||||
authorizationEndpoint = config.get[String]("openid.keycloak.authUrl") + "/protocol/openid-connect/auth",
|
authorizationEndpoint = config.get[String]("openid.keycloak.authUrl") + "/protocol/openid-connect/auth",
|
||||||
tokenEndpoint = config.get[String]("openid.keycloak.authUrl") + "/protocol/openid-connect/token",
|
tokenEndpoint = config.get[String]("openid.keycloak.authUrl") + "/protocol/openid-connect/token",
|
||||||
userInfoEndpoint = config.get[String]("openid.keycloak.authUrl") + "/protocol/openid-connect/userinfo",
|
userInfoEndpoint = config.get[String]("openid.keycloak.authUrl") + "/protocol/openid-connect/userinfo",
|
||||||
scopes = Set("openid", "profile", "email")
|
scopes = Set("openid", "profile", "email"),
|
||||||
|
idClaimName = "sub"
|
||||||
)
|
)
|
||||||
)
|
)
|
||||||
|
|
||||||
def getAuthorizationUrl(providerName: String, state: String, nonce: String): Option[String] = {
|
def getAuthorizationUrl(providerName: String, state: String, nonce: String): Option[String] = {
|
||||||
providers.get(providerName).map { provider =>
|
providers.get(providerName).map { provider =>
|
||||||
val authRequest = if (provider.scopes.contains("openid")) {
|
val authRequest = new AuthorizationRequest.Builder(
|
||||||
// Use OpenID Connect AuthenticationRequest for OpenID providers
|
new ResponseType(ResponseType.Value.CODE),
|
||||||
new AuthenticationRequest.Builder(
|
new com.nimbusds.oauth2.sdk.id.ClientID(provider.clientId)
|
||||||
new ResponseType(ResponseType.Value.CODE),
|
)
|
||||||
new com.nimbusds.oauth2.sdk.Scope(provider.scopes.mkString(" ")),
|
.scope(new com.nimbusds.oauth2.sdk.Scope(provider.scopes.mkString(" ")))
|
||||||
new com.nimbusds.oauth2.sdk.id.ClientID(provider.clientId),
|
.state(new com.nimbusds.oauth2.sdk.id.State(state))
|
||||||
URI.create(provider.redirectUri)
|
.redirectionURI(URI.create(provider.redirectUri))
|
||||||
)
|
.endpointURI(URI.create(provider.authorizationEndpoint))
|
||||||
.state(new com.nimbusds.oauth2.sdk.id.State(state))
|
.build()
|
||||||
.nonce(new Nonce(nonce))
|
|
||||||
.endpointURI(URI.create(provider.authorizationEndpoint))
|
|
||||||
.build()
|
|
||||||
} else {
|
|
||||||
// Use standard OAuth2 AuthorizationRequest for non-OpenID providers (like Discord)
|
|
||||||
new AuthorizationRequest.Builder(
|
|
||||||
new ResponseType(ResponseType.Value.CODE),
|
|
||||||
new com.nimbusds.oauth2.sdk.id.ClientID(provider.clientId)
|
|
||||||
)
|
|
||||||
.scope(new com.nimbusds.oauth2.sdk.Scope(provider.scopes.mkString(" ")))
|
|
||||||
.state(new com.nimbusds.oauth2.sdk.id.State(state))
|
|
||||||
.redirectionURI(URI.create(provider.redirectUri))
|
|
||||||
.endpointURI(URI.create(provider.authorizationEndpoint))
|
|
||||||
.build()
|
|
||||||
}
|
|
||||||
|
|
||||||
authRequest.toURI.toString
|
authRequest.toURI.toString
|
||||||
}
|
}
|
||||||
@@ -150,7 +138,7 @@ class OpenIDConnectService@Inject(ws: WSClient, config: Configuration)(implicit
|
|||||||
if (response.status == 200) {
|
if (response.status == 200) {
|
||||||
val json = response.json
|
val json = response.json
|
||||||
Some(OpenIDUserInfo(
|
Some(OpenIDUserInfo(
|
||||||
id = (json \ "id").as[String],
|
id = (json \ provider.idClaimName).as[String],
|
||||||
email = (json \ "email").asOpt[String],
|
email = (json \ "email").asOpt[String],
|
||||||
name = (json \ "name").asOpt[String].orElse((json \ "login").asOpt[String]),
|
name = (json \ "name").asOpt[String].orElse((json \ "login").asOpt[String]),
|
||||||
picture = (json \ "picture").asOpt[String].orElse((json \ "avatar_url").asOpt[String]),
|
picture = (json \ "picture").asOpt[String].orElse((json \ "avatar_url").asOpt[String]),
|
||||||
@@ -158,10 +146,15 @@ class OpenIDConnectService@Inject(ws: WSClient, config: Configuration)(implicit
|
|||||||
providerName = provider.name
|
providerName = provider.name
|
||||||
))
|
))
|
||||||
} else {
|
} else {
|
||||||
|
logger.error(s"Failed to retrieve user info from ${provider.userInfoEndpoint}, status code ${response.status}")
|
||||||
None
|
None
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
.recover { case _ => None }
|
.recover { case e => {
|
||||||
|
logger.error(s"Failed to retrieve user info from ${provider.userInfoEndpoint}", e)
|
||||||
|
None
|
||||||
|
}
|
||||||
|
}
|
||||||
case None => Future.successful(None)
|
case None => Future.successful(None)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -12,7 +12,6 @@
|
|||||||
|
|
||||||
<properties>
|
<properties>
|
||||||
<!-- Hibernate specific settings -->
|
<!-- Hibernate specific settings -->
|
||||||
<property name="hibernate.dialect" value="org.hibernate.dialect.PostgreSQLDialect"/>
|
|
||||||
<property name="hibernate.hbm2ddl.auto" value="update"/>
|
<property name="hibernate.hbm2ddl.auto" value="update"/>
|
||||||
<property name="hibernate.archive.autodetection" value="class"/>
|
<property name="hibernate.archive.autodetection" value="class"/>
|
||||||
<property name="hibernate.show_sql" value="false"/>
|
<property name="hibernate.show_sql" value="false"/>
|
||||||
|
|||||||
@@ -29,6 +29,7 @@ play.filters.cors {
|
|||||||
# Local Development OpenID Connect Configuration
|
# Local Development OpenID Connect Configuration
|
||||||
openid {
|
openid {
|
||||||
selectUserRoute="http://localhost:5173/select-username"
|
selectUserRoute="http://localhost:5173/select-username"
|
||||||
|
mainRoute="http://localhost:5173/"
|
||||||
|
|
||||||
discord {
|
discord {
|
||||||
clientId = ${?DISCORD_CLIENT_ID}
|
clientId = ${?DISCORD_CLIENT_ID}
|
||||||
|
|||||||
@@ -18,17 +18,18 @@ play.filters.cors {
|
|||||||
openid {
|
openid {
|
||||||
|
|
||||||
selectUserRoute="https://knockout.janis-eccarius.de/select-username"
|
selectUserRoute="https://knockout.janis-eccarius.de/select-username"
|
||||||
|
mainRoute="https://knockout.janis-eccarius.de/"
|
||||||
|
|
||||||
discord {
|
discord {
|
||||||
clientId = ${?DISCORD_CLIENT_ID}
|
clientId = ${?DISCORD_CLIENT_ID}
|
||||||
clientSecret = ${?DISCORD_CLIENT_SECRET}
|
clientSecret = ${?DISCORD_CLIENT_SECRET}
|
||||||
redirectUri = ${?DISCORD_REDIRECT_URI}
|
redirectUri = ${?DISCORD_REDIRECT_URI}
|
||||||
redirectUri = "https://knockout.janis-eccarius.de/auth/discord/callback"
|
redirectUri = "https://knockout.janis-eccarius.de/api/auth/discord/callback"
|
||||||
}
|
}
|
||||||
|
|
||||||
keycloak {
|
keycloak {
|
||||||
clientId = "your-keycloak-client-id"
|
clientId = ${?KEYCLOAK_CLIENT_ID}
|
||||||
clientSecret = "your-keycloak-client-secret"
|
clientSecret = ${?KEYCLOAK_CLIENT_SECRET}
|
||||||
redirectUri = "https://knockout.janis-eccarius.de/api/auth/keycloak/callback"
|
redirectUri = "https://knockout.janis-eccarius.de/api/auth/keycloak/callback"
|
||||||
authUrl = ${?KEYCLOAK_AUTH_URL}
|
authUrl = ${?KEYCLOAK_AUTH_URL}
|
||||||
authUrl = "https://identity.janis-eccarius.de/realms/master"
|
authUrl = "https://identity.janis-eccarius.de/realms/master"
|
||||||
|
|||||||
@@ -15,17 +15,18 @@ play.filters.cors {
|
|||||||
openid {
|
openid {
|
||||||
|
|
||||||
selectUserRoute="https://st.knockout.janis-eccarius.de/select-username"
|
selectUserRoute="https://st.knockout.janis-eccarius.de/select-username"
|
||||||
|
mainRoute="https://st.knockout.janis-eccarius.de/"
|
||||||
|
|
||||||
discord {
|
discord {
|
||||||
clientId = ${?DISCORD_CLIENT_ID}
|
clientId = ${?DISCORD_CLIENT_ID}
|
||||||
clientSecret = ${?DISCORD_CLIENT_SECRET}
|
clientSecret = ${?DISCORD_CLIENT_SECRET}
|
||||||
redirectUri = ${?DISCORD_REDIRECT_URI}
|
redirectUri = ${?DISCORD_REDIRECT_URI}
|
||||||
redirectUri = "https://st.knockout.janis-eccarius.de/auth/discord/callback"
|
redirectUri = "https://st.knockout.janis-eccarius.de/api/auth/discord/callback"
|
||||||
}
|
}
|
||||||
|
|
||||||
keycloak {
|
keycloak {
|
||||||
clientId = "your-keycloak-client-id"
|
clientId = ${?KEYCLOAK_CLIENT_ID}
|
||||||
clientSecret = "your-keycloak-client-secret"
|
clientSecret = ${?KEYCLOAK_CLIENT_SECRET}
|
||||||
redirectUri = "https://st.knockout.janis-eccarius.de/api/auth/keycloak/callback"
|
redirectUri = "https://st.knockout.janis-eccarius.de/api/auth/keycloak/callback"
|
||||||
authUrl = ${?KEYCLOAK_AUTH_URL}
|
authUrl = ${?KEYCLOAK_AUTH_URL}
|
||||||
authUrl = "https://identity.janis-eccarius.de/realms/master"
|
authUrl = "https://identity.janis-eccarius.de/realms/master"
|
||||||
|
|||||||
@@ -1,3 +1,3 @@
|
|||||||
MAJOR=4
|
MAJOR=4
|
||||||
MINOR=40
|
MINOR=49
|
||||||
PATCH=0
|
PATCH=0
|
||||||
|
|||||||
Reference in New Issue
Block a user