pub struct Login {
pub db: String,
pub login: String,
pub password: String,
}Expand description
Check the user credentials and return the user ID
This method performs a “login” to the Odoo server, and returns the corresponding
user ID (uid).
Note that the Odoo JSON-RPC API is stateless; there are no sessions or tokens, each requests passes the password (or API key). Therefore, calling this method “login” is a misnomer - it doesn’t actually “login”, just checks the credentials and returns the ID.
§Example
// note that auth fields (db, login, password) are auto-filled
// for you by the client
let resp = client.common_login().send()?;
println!("UID: {}", resp.uid);See: odoo/service/common.py
See also: base/models/res_users.py
Fields§
§db: StringThe database name
login: StringThe username (e.g., email)
password: StringThe user password
Trait Implementations§
Source§impl JsonRpcParams for Login
impl JsonRpcParams for Login
type Container<T> = OdooApiContainer<Login>
type Response = LoginResponse
fn build(self, id: JsonRpcId) -> JsonRpcRequest<Self>
Source§impl OdooApiMethod for Login
impl OdooApiMethod for Login
Source§fn describe(&self) -> (&'static str, &'static str)
fn describe(&self) -> (&'static str, &'static str)
Describe the JSON-RPC service and method for this type
Source§fn endpoint(&self) -> &'static str
fn endpoint(&self) -> &'static str
Describe method endpoint (e.g., “/web/session/authenticate”)
Source§fn _build(self, id: JsonRpcId) -> JsonRpcRequest<Self>
fn _build(self, id: JsonRpcId) -> JsonRpcRequest<Self>
Build
self into a full JsonRpcRequestAuto Trait Implementations§
impl Freeze for Login
impl RefUnwindSafe for Login
impl Send for Login
impl Sync for Login
impl Unpin for Login
impl UnwindSafe for Login
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