@@ -20,8 +20,8 @@ def __init__(self, *args, **kwargs):
2020 """Initialize settings."""
2121 self .OIDC_OP_TOKEN_ENDPOINT = import_from_settings ('OIDC_OP_TOKEN_ENDPOINT' )
2222 self .OIDC_OP_USER_ENDPOINT = import_from_settings ('OIDC_OP_USER_ENDPOINT' )
23- self .OIDC_OP_CLIENT_ID = import_from_settings ('OIDC_OP_CLIENT_ID ' )
24- self .OIDC_OP_CLIENT_SECRET = import_from_settings ('OIDC_OP_CLIENT_SECRET ' )
23+ self .OIDC_RP_CLIENT_ID = import_from_settings ('OIDC_RP_CLIENT_ID ' )
24+ self .OIDC_RP_CLIENT_SECRET = import_from_settings ('OIDC_RP_CLIENT_SECRET ' )
2525
2626 self .UserModel = get_user_model ()
2727
@@ -31,9 +31,9 @@ def verify_token(self, token, **kwargs):
3131 # Get JWT audience without signature verification
3232 audience = jwt .decode (token , verify = False )['aud' ]
3333
34- secret = self .OIDC_OP_CLIENT_SECRET
34+ secret = self .OIDC_RP_CLIENT_SECRET
3535 if import_from_settings ('OIDC_RP_CLIENT_SECRET_ENCODED' , False ):
36- secret = base64 .urlsafe_b64decode (self .OIDC_OP_CLIENT_SECRET )
36+ secret = base64 .urlsafe_b64decode (self .OIDC_RP_CLIENT_SECRET )
3737
3838 return jwt .decode (token , secret ,
3939 verify = import_from_settings ('OIDC_VERIFY_JWT' , True ),
@@ -46,8 +46,8 @@ def authenticate(self, code=None, state=None):
4646 return None
4747
4848 token_payload = {
49- 'client_id' : self .OIDC_OP_CLIENT_ID ,
50- 'client_secret' : self .OIDC_OP_CLIENT_SECRET ,
49+ 'client_id' : self .OIDC_RP_CLIENT_ID ,
50+ 'client_secret' : self .OIDC_RP_CLIENT_SECRET ,
5151 'grant_type' : 'authorization_code' ,
5252 'code' : code ,
5353 'redirect_uri' : absolutify (reverse ('oidc_authentication_callback' ))
@@ -56,7 +56,7 @@ def authenticate(self, code=None, state=None):
5656 # Get the token
5757 response = requests .post (self .OIDC_OP_TOKEN_ENDPOINT ,
5858 json = token_payload ,
59- verify = import_from_settings ('VERIFY_SSL ' , True ))
59+ verify = import_from_settings ('OIDC_VERIFY_SSL ' , True ))
6060 response .raise_for_status ()
6161
6262 # Validate the token
0 commit comments