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

feat(tent): support additional params #4044

Merged
merged 13 commits into from
Mar 13, 2023
Merged
1 change: 0 additions & 1 deletion demos/jans-tent/.gitignore
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
#auth-client-tdd-specific
clientapp/config.py
clientapp/client_secrets.json

# Byte-compiled / optimized / DLL files
Expand Down
5 changes: 5 additions & 0 deletions demos/jans-tent/clientapp/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -188,6 +188,11 @@ def login():
if cfg.PROVIDER_HOST_STRING is not None:
query_args["providerHost"] = get_provider_host()


if cfg.ADDITIONAL_PARAMS is not None:
query_args |= cfg.ADDITIONAL_PARAMS


response = oauth.op.authorize_redirect(**query_args)

app.logger.debug('/login authorize_redirect(redirect_uri) url = %s' %
Expand Down
52 changes: 52 additions & 0 deletions demos/jans-tent/clientapp/config.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,52 @@
'''
Project: Test Auth Client
Author: Christian Hawk
Copyright 2023 Christian Hawk

Licensed under the Apache License, Version 2.0 (the 'License');
you may not use this file except in compliance with the License.
You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an 'AS IS' BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
'''

CLIENT_ID = "YOUR-CLIENT-ID"
CLIENT_SECRET = "YOUR-CLIENT-SECRET"
SERVER_META_URL = 'https://YOUR_OP_HOST/.well-known/openid-configuration'
REDIRECT_URIS = [
'https://localhost:9090/oidc_callback'
]

USERINFO_URI = "https://your-userinfo-endpoint"

ISSUER = "https://your-server-fqdn"


# Token authentication method can be
# client_secret_basic
# client_secret_post
# none

SERVER_TOKEN_AUTH_METHOD = "client_secret_post"

# for gluu
ACR_VALUES = 'agama'
PRE_SELECTED_PROVIDER = False
PRE_SELECTED_PROVIDER_ID = ''
HAS_PROVIDER_HOST = False
PROVIDER_HOST_STRING = None

# ADDITIONAL PARAMS TO CALL AUTHORIZE ENDPOINT, WITHOUT BASE64 ENCODING. USE DICT {'param': 'value'}
# ADDITIONAL_PARAMS = {'paramOne': 'valueOne', 'paramTwo': 'valueTwo'}
ADDITIONAL_PARAMS = None


# SYSTEM SETTINGS
# use with caution, unsecure requests, for develpment environments
SSL_VERIFY = False