Struct tozny_auth::realm::Realm
[-] [+]
[src]
pub struct Realm { // some fields omitted }
Type representing a particular Tozny realm.
Methods
impl Realm
fn new(key_id: KeyId, secret: Secret, url: Url) -> Realm
Creates a new realm interface.
This does not create a Tozny realm - it just creates an object to interact with an existing real.
fn raw_call(&self, method: &Method, params: &Object) -> Result<Json, QuestionError>
Low-level method to make arbitrary realm-level API calls.
fn verify_login(&self, signed_data: &str, signature: &str) -> Result<Login, QuestionError>
Given a response from the check_session_status
call in UserApi,
verifies that the response is signed by Tozny, and decodes a Login
value.
This function runs locally - it does not make any network requests.
fn check_valid_login(&self, uid: &UserId, sid: &SessionId, expires_at: &Timestamp) -> Result<bool, QuestionError>
Checks whether a given session is valid for a given user. This is an
alternative to using check_session_status
and verify_login
.
fn question_challenge<A, B>(&self, question: &A, user_id: &Option<UserId>) -> Result<B, QuestionError> where A: ToJson, B: Decodable
fn user_get(&self, user_id: &UserId) -> Result<User, QuestionError>
Given a Tozny user id, retrieves additional information associated with that user.