use wasm_bindgen::prelude::*;
#[wasm_bindgen(module = "@unilim/cas")]
extern "C" {
pub type OAuth2;
#[wasm_bindgen(constructor)]
pub fn new(identifier: String, callback: String, scopes: Vec<String>) -> OAuth2;
pub type CAS;
#[wasm_bindgen(method, getter)]
pub fn cookie(this: &CAS) -> String;
#[wasm_bindgen(method, catch)]
pub async fn authorize(
this: &CAS,
client: &OAuth2,
challenge: Option<bool>,
state: Option<String>,
) -> Result<JsValue, JsValue>;
#[wasm_bindgen(method, catch)]
pub async fn tokenize(
this: &CAS,
callback: String,
client: &OAuth2,
challenge: Option<bool>,
) -> Result<JsValue, JsValue>;
}