|
|
|
@ -10,6 +10,8 @@ from yellow.models import User
|
|
|
|
|
@keycloak.after_login()
|
|
|
|
|
async def handle_user_login(auth_token: KeycloakAuthToken):
|
|
|
|
|
username = auth_token.username
|
|
|
|
|
uid = auth_token.sub
|
|
|
|
|
|
|
|
|
|
if not re.match(r"^[a-zA-Z0-9_\.-]+$", username):
|
|
|
|
|
raise Exception("bad username")
|
|
|
|
|
|
|
|
|
|