#steam #actix-web #login #openid

steam-connect

实现Steam网页授权,以便在带有或没有actix_web的项目中简单使用

11个版本 (4个稳定版)

1.3.0 2022年10月19日
1.2.0 2022年10月1日
1.0.0 2022年5月11日
0.2.1 2022年5月9日
0.1.4 2022年5月9日

#803身份验证

MIT 许可证

17KB
206

steam-connect

实现Steam网页授权,以便在带有或没有actix_web的项目中简单使用

用法

示例

// Getting the authorization link. Requires a link to redirect
// the user after authorization. If used in a project with
// actix_web, you can use the redirect function defined in Redirect
let url = Redirect::new("http://127.0.0.1:8080/auth/callback").unwrap();

// Performs data validation when returning to the callback page
let verify = Verify::verify_request(req.query_string()).await.unwrap();

verify.claim_id(); // Get SteamID64 of an authorized user

// Queries the steam api for more information about the profile.
verify.get_summaries();

您可以使用示例项目(使用actix_web)进行研究


lib.rs:

steam-connect

实现Steam网页授权,以便在带有或没有actix_web的项目中简单使用

用法

示例

// Getting the authorization link. Requires a link to redirect
// the user after authorization. If used in a project with
// actix_web, you can use the redirect function defined in Redirect
let url = Redirect::new("http://127.0.0.1:8080/auth/callback").unwrap();

// Performs data validation when returning to the callback page
let verify = Verify::verify_request(req.query_string()).await.unwrap();

verify.claim_id(); // Get SteamID64 of an authorized user

// Queries the steam api for more information about the profile.
verify.get_summaries();

您可以使用示例项目(使用actix_web)进行研究

依赖项

~6–21MB
~335K SLoC