MCPcopy Create free account
hub / github.com/dwavesystems/dwave-cloud-client / get_authorization_url

Method get_authorization_url

dwave/cloud/auth/flows.py:194–204  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

192 self._save_token_to_creds(value)
193
194 def get_authorization_url(self) -> str:
195 self.state = generate_token(30)
196 self.code_verifier = generate_token(48)
197
198 url, _ = self.session.create_authorization_url(
199 url=self.authorization_endpoint,
200 state=self.state,
201 code_verifier=self.code_verifier)
202
203 logger.debug(f"{type(self).__name__}.get_authorization_url() = {url!r}")
204 return url
205
206 def fetch_token(self, *, code: str, **kwargs) -> dict:
207 """Exchange ``code`` for access token.

Callers 5

test_auth_urlMethod · 0.95
test_fetch_tokenMethod · 0.95
run_oob_flowMethod · 0.80
run_redirect_flowMethod · 0.80

Calls

no outgoing calls

Tested by 3

test_auth_urlMethod · 0.76
test_fetch_tokenMethod · 0.76