1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59
//! Kerberos client //! //! # Concepts //! * KDC (Key Distribution Center): Service that distributes the tickets. The host that provides this server is also called KDC. //! * TGS (Ticket Granting Server): Ticket used to authenticate the user against a specified service. //! * TGT (Ticket Granting Ticket): Ticket used to retrieve the TGS's from the KDC. //! //! # Examples //! //! Asking for a TGT: //! //! ```no_run //! use kerbeiros::*; //! use ascii::AsciiString; //! use std::net::*; //! //! // Prepare the arguments //! let realm = AsciiString::from_ascii("CONTOSO.COM").unwrap(); //! let kdc_address = IpAddr::V4(Ipv4Addr::new(192, 168, 0, 1)); //! let username = AsciiString::from_ascii("Bob").unwrap(); //! let user_key = Key::Password("S3cr3t".to_string()); //! //! // Request the TGT //! let tgt_requester = TgtRequester::new(realm, kdc_address); //! let credential = tgt_requester.request(&username, Some(&user_key)).unwrap(); //! //! // Save the ticket into a Windows format file //! credential.clone().save_into_krb_cred_file("bob_tgt.krb").unwrap(); //! //! // Save the ticket into a Linux format file //! credential.save_into_ccache_file("bob_tgt.ccache").unwrap(); //! ``` //! //! # Kerberos References //! * [RFC 4120: The Kerberos Network Authentication Service (V5)](https://tools.ietf.org/html/rfc4120) //! * [\[MS-KILE\]: Kerberos Protocol Extensions](https://docs.microsoft.com/en-us/openspecs/windows_protocols/ms-kile) //! mod transporter; mod error; pub use error::{Result, Error}; pub mod messages; pub use messages::*; pub mod credentials; pub use credentials::*; pub mod key; pub use key::*; pub mod requesters; pub use requesters::*; pub mod utils; pub use utils::*; mod mappers;