xia_sso_flask.sso.XiaSsoFlask

class xia_sso_flask.sso.XiaSsoFlask

Bases: object

XIA Login SSO Module for Flask

Logged in status:
  • all user related information was retrieved by cookies.

  • g.user_id: User Mail Address

  • g.user_info: A dictionary holds the user related information

  • g.acl: A dictionary holds the User’s permissions for all requested applications.

__init__()

Methods

__init__()

get_sso_blueprint(home_path, token_manager, ...)

Get SSO Management Blueprint

classmethod get_sso_blueprint(home_path: str, token_manager: Type[FlaskToken], refresh_path: str, role_manager: Type[UserRoles], matrix_manager: Type[RoleMatrix], user_manager: Optional[Type[User]] = None, app_name: str = '', sso_provider_url: str = '', token_life: int = 120, debug: bool = False)

Get SSO Management Blueprint

Parameters
  • home_path – homepage path of flask, like “/”

  • token_manager – Token Management Class, should be a subclass of FlaskToken

  • refresh_path – From which path could the access token be refreshed

  • role_manager – Role Management

  • matrix_manager – Role Matrix Management, will be used for permission detail

  • user_manager – User Management, only need to be assigned if want to get user’s other information

  • app_name – The profile of which app should be retrieved

  • sso_provider_url – The XIA sso provider location

  • token_life – SSO token will expire in specified seconds

  • debug – Generate debug page: Weather the program should generate a debug endpoint

Returns

Flask blueprint