(ctx: Context)
| 14 | use tokio::runtime::Handle; |
| 15 | |
| 16 | pub fn create_sso_provider_class(ctx: Context) -> GcRefLock<'_, Class> { |
| 17 | let mut sso_provider_class = Class::new(ctx.intern(b"SsoProvider")); |
| 18 | sso_provider_class.methods = [ |
| 19 | ( |
| 20 | ctx.intern(b"authority_url"), |
| 21 | Value::NativeFunction(crate::NativeFn(authority_url)), |
| 22 | ), |
| 23 | ( |
| 24 | ctx.intern(b"verify"), |
| 25 | Value::NativeFunction(crate::NativeFn(verify)), |
| 26 | ), |
| 27 | ] |
| 28 | .into_iter() |
| 29 | .collect(); |
| 30 | Gc::new(&ctx, RefLock::new(sso_provider_class)) |
| 31 | } |
| 32 | |
| 33 | type SsoProviderClient< |
| 34 | HasAuthUrl = EndpointSet, |
no test coverage detected