MCPcopy Create free account
hub / github.com/pgadmin-org/pgadmin4 / __create_blueprint

Function __create_blueprint

web/pgadmin/authenticate/mfa/__init__.py:21–43  ·  view source on GitHub ↗

Geneates the blueprint for 'mfa' endpoint, and also - define the required endpoints within that blueprint. Returns: Blueprint: MFA blueprint object

()

Source from the content-addressed store, hash-verified

19
20
21def __create_blueprint() -> Blueprint:
22 """
23 Geneates the blueprint for 'mfa' endpoint, and also - define the required
24 endpoints within that blueprint.
25
26 Returns:
27 Blueprint: MFA blueprint object
28 """
29 blueprint = Blueprint(
30 "mfa", __name__, url_prefix="/mfa",
31 static_folder="static",
32 template_folder="templates"
33 )
34
35 blueprint.add_url_rule(
36 "/validate", "validate", validate_view, methods=("GET", "POST",)
37 )
38
39 blueprint.add_url_rule(
40 "/register", "register", registration_view, methods=("GET", "POST",)
41 )
42
43 return blueprint
44
45
46def init_app(app: Flask):

Callers 1

Calls

no outgoing calls

Tested by

no test coverage detected