claudevervoort / ltibootcamp Goto Github PK
View Code? Open in Web Editor NEWLicense: Apache License 2.0
License: Apache License 2.0
When running
auth_request_params = {
'scope': 'open_id', #we only use the flow for OIDC, not to get an access token
'response_type': 'id_token',
'client_id': tool_info['client_id'],
'login_hint': init_login_request['login_hint'],
'lti_message_hint': init_login_request['lti_message_hint'],
'response_mode': 'form_post', # with LTI we expect the user to already have a session in the platform
'nonce': nonce, #a nonce compared to state should fail if replayed
'state': orig_state, #state is optional
'redirect_uri': redirect_uri
}
autopost_iframe('deeplinking', tool_info['oidc_auth_endpoint'], auth_request_params)
I get
AttributeError
AttributeError: 'str' object has no attribute 'decode'
Traceback (most recent call last)
File "/home/hugo/ws/serlo/lti/ltibootcamp/.venv/lib/python3.8/site-packages/flask/app.py", line 2091, in __call__
return self.wsgi_app(environ, start_response)
File "/home/hugo/ws/serlo/lti/ltibootcamp/.venv/lib/python3.8/site-packages/flask/app.py", line 2076, in wsgi_app
response = self.handle_exception(e)
File "/home/hugo/ws/serlo/lti/ltibootcamp/.venv/lib/python3.8/site-packages/flask/app.py", line 2073, in wsgi_app
response = self.full_dispatch_request()
File "/home/hugo/ws/serlo/lti/ltibootcamp/.venv/lib/python3.8/site-packages/flask/app.py", line 1518, in full_dispatch_request
rv = self.handle_user_exception(e)
File "/home/hugo/ws/serlo/lti/ltibootcamp/.venv/lib/python3.8/site-packages/flask/app.py", line 1516, in full_dispatch_request
rv = self.dispatch_request()
File "/home/hugo/ws/serlo/lti/ltibootcamp/.venv/lib/python3.8/site-packages/flask/app.py", line 1502, in dispatch_request
return self.ensure_sync(self.view_functions[rule.endpoint])(**req.view_args)
File "/home/hugo/ws/serlo/lti/ltibootcamp/server/lti_platform.py", line 82, in oidc_authorization
return render_template('postauthresponse.html', redirect_uri=redirect_uri, state=state, id_token=id_token.decode('utf-8'))
AttributeError: 'str' object has no attribute 'decode'
The only way to get the id_token
for the next block is printing it in the terminal.
Python 3.8.10
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.