<commit_before>import flask
from flask import Flask, jsonify

from flask_pyoidc.flask_pyoidc import OIDCAuthentication

PORT = 5000
app = Flask(__name__)

app.config.update({'SERVER_NAME': 'localhost:{}'.format(PORT),
                   'SECRET_KEY': 'dev_key'})
auth = OIDCAuthentication(app, issuer="https://localhost:50009")


@app.route('/')
@auth.oidc_auth
def index():
    return jsonify(id_token=flask.g.id_token.to_dict(), access_token=flask.g.access_token,
                   userinfo=flask.g.userinfo.to_dict())


@app.route('/logout')
@auth.oidc_logout
def logout():
    return 'You\'ve been successfully logged out!'


if __name__ == '__main__':
    app.run(port=PORT)<commit_msg>Update example app with to use session data instead of global data.<commit_after>import flask
from flask import Flask, jsonify

from flask_pyoidc.flask_pyoidc import OIDCAuthentication

PORT = 5000
app = Flask(__name__)

app.config.update({'SERVER_NAME': 'localhost:{}'.format(PORT),
                   'SECRET_KEY': 'dev_key'})
auth = OIDCAuthentication(app, issuer="https://localhost:50009")


@app.route('/')
@auth.oidc_auth
def index():
    return jsonify(id_token=flask.session['id_token'], access_token=flask.session['access_token'],
                   userinfo=flask.session['userinfo'])


@app.route('/logout')
@auth.oidc_logout
def logout():
    return 'You\'ve been successfully logged out!'


if __name__ == '__main__':
    app.run(port=PORT)
{'fraction_non_alphanumeric': 0.1411764705882353, 'fraction_numerical': 0.01245674740484429, 'mean_word_length': 4.4772727272727275, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 2, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '4575016', 'n_tokens_mistral': 514, 'n_tokens_neox': 486, 'n_words': 98}