Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
SoumyaBadola opened this issue Aug 18, 2021 · 0 comments
Open

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

SoumyaBadola opened this issue Aug 18, 2021 · 0 comments

Comments

@SoumyaBadola
Copy link

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"
}
}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant