Merge branch 'oauth-userid-fix-pleasework' into 'master'
Update cps/ub.py, cps/admin.py, cps/templates/config_edit.html See merge request Jafner/calibre-web!4
This commit is contained in:
commit
e5fe6c7077
@ -1120,7 +1120,7 @@ def _configuration_oauth_helper(to_save):
|
|||||||
"oauth_base_url": to_save["config_" + str(element['id']) + "_oauth_base_url"],
|
"oauth_base_url": to_save["config_" + str(element['id']) + "_oauth_base_url"],
|
||||||
"oauth_auth_url": to_save["config_" + str(element['id']) + "_oauth_auth_url"],
|
"oauth_auth_url": to_save["config_" + str(element['id']) + "_oauth_auth_url"],
|
||||||
"oauth_token_url": to_save["config_" + str(element['id']) + "_oauth_token_url"],
|
"oauth_token_url": to_save["config_" + str(element['id']) + "_oauth_token_url"],
|
||||||
"oauth_userinfo_url": to_save["config_" + str(element['id']) + "oauth_userinfo_url"],
|
"oauth_userinfo_url": to_save["config_" + str(element['id']) + "_oauth_userinfo_url"],
|
||||||
"username_mapper": to_save["config_" + str(element['id']) + "_username_mapper"],
|
"username_mapper": to_save["config_" + str(element['id']) + "_username_mapper"],
|
||||||
"email_mapper": to_save["config_" + str(element['id']) + "_email_mapper"],
|
"email_mapper": to_save["config_" + str(element['id']) + "_email_mapper"],
|
||||||
"login_button": to_save["config_" + str(element['id']) + "_login_button"],
|
"login_button": to_save["config_" + str(element['id']) + "_login_button"],
|
||||||
|
@ -331,10 +331,10 @@
|
|||||||
<input type="text" class="form-control" id="config_{{ prov['id'] }}_oauth_token_url" name="config_{{ prov['id'] }}_oauth_token_url" value="{% if prov['oauth_token_url']%}{{ prov['oauth_token_url'] }}{% endif %}" autocomplete="off">
|
<input type="text" class="form-control" id="config_{{ prov['id'] }}_oauth_token_url" name="config_{{ prov['id'] }}_oauth_token_url" value="{% if prov['oauth_token_url']%}{{ prov['oauth_token_url'] }}{% endif %}" autocomplete="off">
|
||||||
</div>
|
</div>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
{% if 'oauth_userid_url' in prov %}
|
{% if 'oauth_userinfo_url' in prov %}
|
||||||
<div class="form-group">
|
<div class="form-group">
|
||||||
<label for="config_{{ prov['id'] }}_oauth_userid_url">{{_('%(provider)s OAuth UserID URL (relative)', provider=prov['provider_name'])}}</label>
|
<label for="config_{{ prov['id'] }}_oauth_userinfo_url">{{_('%(provider)s OAuth UserInfo URL (relative)', provider=prov['provider_name'])}}</label>
|
||||||
<input type="text" class="form-control" id="config_{{ prov['id'] }}_oauth_userid_url" name="config_{{ prov['id'] }}_oauth_userid_url" value="{% if prov['oauth_userid_url']%}{{ prov['oauth_userid_url'] }}{% endif %}" autocomplete="off">
|
<input type="text" class="form-control" id="config_{{ prov['id'] }}_oauth_userinfo_url" name="config_{{ prov['id'] }}_oauth_userinfo_url" value="{% if prov['oauth_userinfo_url']%}{{ prov['oauth_userinfo_url'] }}{% endif %}" autocomplete="off">
|
||||||
</div>
|
</div>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
{% if 'username_mapper' in prov %}
|
{% if 'username_mapper' in prov %}
|
||||||
|
@ -260,10 +260,10 @@ class OAuthProvider(Base):
|
|||||||
provider_name = Column(String)
|
provider_name = Column(String)
|
||||||
oauth_client_id = Column(String)
|
oauth_client_id = Column(String)
|
||||||
oauth_client_secret = Column(String)
|
oauth_client_secret = Column(String)
|
||||||
|
oauth_userinfo_url = Column(String, default="/protocol/openid-connect/userinfo")
|
||||||
oauth_base_url = Column(String)
|
oauth_base_url = Column(String)
|
||||||
oauth_auth_url = Column(String, default="/protocol/openid-connect/auth")
|
oauth_auth_url = Column(String, default="/protocol/openid-connect/auth")
|
||||||
oauth_token_url = Column(String, default="/protocol/openid-connect/token")
|
oauth_token_url = Column(String, default="/protocol/openid-connect/token")
|
||||||
oauth_userid_url = Column(String, default="/application/o/userinfo/")
|
|
||||||
scope = Column(String, default="openid profile email")
|
scope = Column(String, default="openid profile email")
|
||||||
username_mapper = Column(String, default="preferred_username")
|
username_mapper = Column(String, default="preferred_username")
|
||||||
email_mapper = Column(String, default="email")
|
email_mapper = Column(String, default="email")
|
||||||
|
Loading…
Reference in New Issue
Block a user