File tree Expand file tree Collapse file tree 1 file changed +5
-3
lines changed Expand file tree Collapse file tree 1 file changed +5
-3
lines changed Original file line number Diff line number Diff line change
1
+ import os
1
2
import json
2
3
import random
3
4
import re
@@ -33,7 +34,8 @@ def absolute_uri(self, path=None) -> str:
33
34
return path
34
35
35
36
def get_setting (self , name ) -> Any :
36
- """Mocked setting method."""
37
+ """ settings from environment """
38
+ return os .getenv (name , '' )
37
39
38
40
@staticmethod
39
41
def get_json (url , method = 'GET' , * args , ** kwargs ) -> httpx .Response :
@@ -64,8 +66,8 @@ def __init__(self, client: OAuth2Client) -> None:
64
66
self .provider = client .backend .name
65
67
self .redirect_uri = client .redirect_uri
66
68
self .backend = client .backend (OAuth2Strategy ())
67
- self ._authorization_endpoint = client .backend .AUTHORIZATION_URL
68
- self ._token_endpoint = client .backend .ACCESS_TOKEN_URL
69
+ self ._authorization_endpoint = self .backend .authorization_url ()
70
+ self ._token_endpoint = self .backend .access_token_url ()
69
71
self ._oauth_client = WebApplicationClient (self .client_id )
70
72
71
73
@property
You can’t perform that action at this time.
0 commit comments