Skip to content

Commit 14a6be5

Browse files
committed
Merge branch 'versioning'
2 parents 9946739 + e85dbc4 commit 14a6be5

File tree

3 files changed

+6
-5
lines changed

3 files changed

+6
-5
lines changed

app.py

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,12 @@
1-
import identity
21
import identity.web
32
import requests
43
from flask import Flask, redirect, render_template, request, session, url_for
54
from flask_session import Session
65

76
import app_config
87

8+
__version__ = "0.7.0" # The version of this sample, for troubleshooting purpose
9+
910
app = Flask(__name__)
1011
app.config.from_object(app_config)
1112
assert app.config["REDIRECT_PATH"] != "/", "REDIRECT_PATH must not be /"
@@ -28,7 +29,7 @@
2829

2930
@app.route("/login")
3031
def login():
31-
return render_template("login.html", version=identity.__version__, **auth.log_in(
32+
return render_template("login.html", version=__version__, **auth.log_in(
3233
scopes=app_config.SCOPE, # Have user consent to scopes during log-in
3334
redirect_uri=url_for("auth_response", _external=True), # Optional. If present, this absolute URL must match your app's redirect_uri registered in Azure Portal
3435
))
@@ -55,7 +56,7 @@ def index():
5556
return render_template('config_error.html')
5657
if not auth.get_user():
5758
return redirect(url_for("login"))
58-
return render_template('index.html', user=auth.get_user(), version=identity.__version__)
59+
return render_template('index.html', user=auth.get_user(), version=__version__)
5960

6061

6162
@app.route("/call_downstream_api")

templates/index.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ <h2>Welcome {{ user.get("name") }}!</h2>
2121
</ul>
2222

2323
<hr>
24-
<footer style="text-align: right">Powered by Identity Web {{ version }}</footer>
24+
<footer style="text-align: right">Microsoft identity platform Web App Sample {{ version }}</footer>
2525
</body>
2626
</html>
2727

templates/login.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ <h1>Microsoft Identity Python Web App</h1>
2424
{% endif %}
2525

2626
<hr>
27-
<footer style="text-align: right">Powered by Identity Web {{ version }}</footer>
27+
<footer style="text-align: right">Microsoft identity platform Web App Sample {{ version }}</footer>
2828
</body>
2929
</html>
3030

0 commit comments

Comments
 (0)