File tree Expand file tree Collapse file tree 1 file changed +4
-5
lines changed Expand file tree Collapse file tree 1 file changed +4
-5
lines changed Original file line number Diff line number Diff line change 1- import os
21import json
2+ import os
33import random
44import re
55import string
@@ -34,9 +34,8 @@ def absolute_uri(self, path=None) -> str:
3434 return path
3535
3636 def get_setting (self , name ) -> Any :
37- """ settings from environment """
3837 value = os .getenv (name )
39- if value == None :
38+ if value is None :
4039 raise KeyError
4140 return value
4241
@@ -69,8 +68,8 @@ def __init__(self, client: OAuth2Client) -> None:
6968 self .provider = client .backend .name
7069 self .redirect_uri = client .redirect_uri
7170 self .backend = client .backend (OAuth2Strategy ())
72- self ._authorization_endpoint = self .backend .authorization_url () if hasattr ( self .backend , ' authorization_url' ) else self . backend . AUTHORIZATION_URL
73- self ._token_endpoint = self .backend .access_token_url () if hasattr ( self .backend , ' access_token_url' ) else self . backend . ACCESS_TOKEN_URL
71+ self ._authorization_endpoint = client .backend .AUTHORIZATION_URL or self .backend . authorization_url ()
72+ self ._token_endpoint = client .backend .ACCESS_TOKEN_URL or self .backend . access_token_url ()
7473 self ._oauth_client = WebApplicationClient (self .client_id )
7574
7675 @property
You can’t perform that action at this time.
0 commit comments