mirror of
https://github.com/StefBuwalda/ProjectIOT.git
synced 2025-10-30 11:19:57 +00:00
Moved frontend stuff to main area
This commit is contained in:
@@ -2,6 +2,7 @@ from flask import Flask
|
||||
from flask_migrate import Migrate
|
||||
from flask_sqlalchemy import SQLAlchemy
|
||||
from pyplatex import ANPR # type: ignore
|
||||
from authlib.integrations.flask_client import OAuth
|
||||
|
||||
# Web Server
|
||||
app = Flask(__name__)
|
||||
@@ -17,3 +18,25 @@ migrate = Migrate(app, db)
|
||||
|
||||
# ANPR instance
|
||||
anpr = ANPR()
|
||||
|
||||
# Keycloak
|
||||
oauth = OAuth(app=app)
|
||||
url = "http://192.168.69.1:8180"
|
||||
keycloak: ... = oauth.register(
|
||||
name="keycloak",
|
||||
client_id="ProjectIOT",
|
||||
client_secret="IWKfsx2aLHCMr0iUaZOuws6UwiYrVQ60",
|
||||
authorize_url=(f"{url}/realms/ProjectIOT/protocol/openid-connect/auth"),
|
||||
authorize_params=None,
|
||||
access_token_url=(
|
||||
f"{url}/realms/ProjectIOT/protocol/openid-connect/token"
|
||||
),
|
||||
refresh_token_url=(
|
||||
f"{url}/realms/ProjectIOT/protocol/openid-connect/token"
|
||||
),
|
||||
api_base_url=(f"{url}/realms/ProjectIOT/protocol/openid-connect"),
|
||||
client_kwargs={"scope": "openid profile email"},
|
||||
server_metadata_url=(
|
||||
"{url}/realms/ProjectIOT/.well-known/openid-configuration"
|
||||
),
|
||||
)
|
||||
|
||||
Reference in New Issue
Block a user