pub struct USaintSession(/* private fields */);Expand description
u-saint 로그인이 필요한 애플리케이션 사용 시 애플리케이션에 제공하는 세션
Implementations§
Source§impl USaintSession
impl USaintSession
Sourcepub fn anonymous() -> USaintSession
pub fn anonymous() -> USaintSession
익명 세션을 반환합니다. 인증이 필요 없는 애플리케이션에서의 세션 동작과 동일합니다.
Sourcepub async fn with_token(
id: &str,
token: &str,
) -> Result<USaintSession, RusaintError>
pub async fn with_token( id: &str, token: &str, ) -> Result<USaintSession, RusaintError>
SSO 로그인 토큰과 학번으로 인증된 세션을 반환합니다.
Sourcepub async fn with_password(
id: &str,
password: &str,
) -> Result<USaintSession, RusaintError>
pub async fn with_password( id: &str, password: &str, ) -> Result<USaintSession, RusaintError>
학번과 비밀번호로 인증된 세션을 반환합니다.
Sourcepub fn save_to_json<W: Write>(&self, writer: &mut W) -> Result<(), RusaintError>
pub fn save_to_json<W: Write>(&self, writer: &mut W) -> Result<(), RusaintError>
현재 세션의 쿠키를 json 형식으로 저장합니다.
Sourcepub fn from_json<R: BufRead>(reader: R) -> Result<USaintSession, RusaintError>
pub fn from_json<R: BufRead>(reader: R) -> Result<USaintSession, RusaintError>
json 형식으로 저장된 쿠키를 읽어 세션을 생성합니다.
Trait Implementations§
Source§impl CookieStore for USaintSession
impl CookieStore for USaintSession
Store a set of Set-Cookie header values received from
urlGet any Cookie values in the store for
urlSource§impl Debug for USaintSession
impl Debug for USaintSession
Source§impl Default for USaintSession
impl Default for USaintSession
Source§fn default() -> USaintSession
fn default() -> USaintSession
Returns the “default value” for a type. Read more
Auto Trait Implementations§
impl !Freeze for USaintSession
impl RefUnwindSafe for USaintSession
impl Send for USaintSession
impl Sync for USaintSession
impl Unpin for USaintSession
impl UnwindSafe for USaintSession
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