MCPcopy Create free account
hub / github.com/aiscriptdev/aiscript / get_client

Function get_client

aiscript-vm/src/builtins/sso.rs:115–125  ·  view source on GitHub ↗
(fields: AuthFields)

Source from the content-addressed store, hash-verified

113}
114
115fn get_client(fields: AuthFields) -> SsoProviderClient {
116 let auth_endpoint =
117 AuthUrl::new(fields.auth_endpoint).expect("Invalid authorization endpoint URL");
118 let token_endpoint = TokenUrl::new(fields.token_endpoint).expect("Invalid token endpoint URL");
119
120 BasicClient::new(ClientId::new(fields.client_id))
121 .set_client_secret(ClientSecret::new(fields.client_secret))
122 .set_auth_uri(auth_endpoint)
123 .set_token_uri(token_endpoint)
124 .set_redirect_uri(RedirectUrl::new(fields.redirect_url).expect("Invalid redirect URL"))
125}
126
127fn authority_url<'gc>(
128 state: &mut State<'gc>,

Callers 2

authority_urlFunction · 0.85
verifyFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected