Source code for gws.common.auth.method

import gws
import gws.types as t

from . import error


#:export IAuthMethod
[docs]class Object(gws.Object, t.IAuthMethod):
[docs] def configure(self): super().configure() self.type: str = self.var('type')
[docs] def open_session(self, auth: t.IAuthManager, req: t.IRequest) -> t.Optional[t.ISession]: pass
[docs] def close_session(self, auth: t.IAuthManager, sess: t.ISession, req: t.IRequest, res: t.IResponse): pass
[docs] def login(self, auth: t.IAuthManager, login: str, password: str, req: t.IRequest) -> t.Optional[t.ISession]: raise error.AccessDenied()
[docs] def logout(self, auth: t.IAuthManager, sess: t.ISession, req: t.IRequest) -> t.ISession: pass