pub struct Verifier { /* private fields */ }Expand description
Verifies the login details returned after users have gone through the ‘sign in with Steam’ page
§Example
let (req, verifier) = Verifier::from_querystring(qs).unwrap();
// send off req, get back response
match verifier.verify_response(response.body()) {
Ok(steam_id) => (), // got steam id
Err(e) => (), // Auth failure
}Implementations§
Source§impl Verifier
impl Verifier
Sourcepub fn from_querystring<S: AsRef<str>>(
s: S,
) -> Result<(Request<Vec<u8>>, Self), Error>
pub fn from_querystring<S: AsRef<str>>( s: S, ) -> Result<(Request<Vec<u8>>, Self), Error>
Constructs a Verifier and a HTTP request from a query string. You must use the method,
headers, URI and body from the returned http::Request struct.
Sourcepub fn from_parsed(
login_data: SteamLoginData,
) -> Result<(Request<Vec<u8>>, Self), Error>
pub fn from_parsed( login_data: SteamLoginData, ) -> Result<(Request<Vec<u8>>, Self), Error>
Constructs a Verifier and a HTTP request directly from the data deserialized from the query
string. This may be useful if you are using a web framework which offers the ability to
deserialize data during route matching. You must use the method, headers, URI and body from
the returned http::Request struct.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Verifier
impl RefUnwindSafe for Verifier
impl Send for Verifier
impl Sync for Verifier
impl Unpin for Verifier
impl UnwindSafe for Verifier
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more