``` package fermyon:kubecon interface github-oauth { exchange: func(headers: list<tuple<string,string>>, state_param: string) -> bool validate: func(code: string, redirect-url: string, client-id: string, client-secret: string) -> string } /// An implementation of oauth middleware targets this world. world oauth-component-library { import wasi:http/outgoing-handler export github-oauth } world github-oauth-handler { export wasi:http/incoming-handler import oauth-component-library } ``` Workflow - cargo component new --reactor <name> - Update wit - add deps directory for wasi outgoing http wit file - call outgoing request and handle in func Add new world for handler. Notes: cargo-component-component 0.2.0 (wasi:aec4b25) aec4b25 sha refers to commit in wasmtime
×
Sign in
Email
Password
Forgot password
or
By clicking below, you agree to our
terms of service
.
Sign in via Facebook
Sign in via Twitter
Sign in via GitHub
Sign in via Dropbox
Sign in with Wallet
Wallet (
)
Connect another wallet
New to HackMD?
Sign up