puiterwijk / flask-oidc

OpenID Connect support for Flask
BSD 2-Clause "Simplified" License
157 stars 219 forks source link

ERROR:flask_oidc:Expecting value: line 1 column 1 (char 0) #131

Open SoumyaBadola opened 3 years ago

SoumyaBadola commented 3 years ago

Getting this error in implementing flask OIDC. Using below code. import json import logging from flask import Flask, g from flask_oidc import OpenIDConnect logging.basicConfig(level=logging.DEBUG) app = Flask(name) app.config.update({ 'SECRET_KEY': 'SomethingNotEntirelySecret',

'SSL_CONTENT':False,

'TESTING': True,
'DEBUG': True,
"VERIFY_SSL_SERVER": False,
'OIDC_CLIENT_SECRETS': 'client_secrets.json',
'OIDC_ID_TOKEN_COOKIE_SECURE': False,
'OIDC_REQUIRE_VERIFIED_EMAIL': False,
'OIDC_RESOURCE_SERVER_ONLY'  : True,
#'OIDC_INTROSPECTION_AUTH_METHOD': 'bearer',
'OIDC_INTROSPECTION_AUTH_METHOD': 'client_secret_post',
'OIDC-SCOPES':['openid'],
'OIDC_TOKEN_TYPE_HINT': 'access_token'

})

oidc = OpenIDConnect(app)

@app.route('/') def hello_world(): return 'Welcome anonymous'

@app.route('/api') @oidc.accept_token(require_token=True) def hello_api(): return 'welcome' if name == 'main': app.run()

JSON file- { "web": { "auth_uri": "https://***************/authorization.oauth2", "client_id": "T/", "client_secret": "/", "redirect_uris": [ "" ], "userinfo_uri": "https://***************.openid", "token_uri": "https://***************.s/token.oauth2", "token_introspection_uri": "https://***************./token.oauth2/introspect.oauth2" } }