(
state: &mut State<'gc>,
_args: Vec<Value<'gc>>,
)
| 125 | } |
| 126 | |
| 127 | fn authority_url<'gc>( |
| 128 | state: &mut State<'gc>, |
| 129 | _args: Vec<Value<'gc>>, |
| 130 | ) -> Result<Value<'gc>, VmError> { |
| 131 | let mut fields = parse_auth_fields(state)?; |
| 132 | let scopes = mem::take(&mut fields.scopes); |
| 133 | // Generate the authorization URL to which we'll redirect the user. |
| 134 | let (authorize_url, _csrf_state) = get_client(fields) |
| 135 | .authorize_url(CsrfToken::new_random) |
| 136 | .add_scopes(scopes) |
| 137 | .url(); |
| 138 | |
| 139 | Ok(Value::String( |
| 140 | state.intern(authorize_url.as_str().as_bytes()), |
| 141 | )) |
| 142 | } |
| 143 | |
| 144 | fn verify<'gc>(state: &mut State<'gc>, args: Vec<Value<'gc>>) -> Result<Value<'gc>, VmError> { |
| 145 | let mut i = 0; |
nothing calls this directly
no test coverage detected