sirepo.auth package

Authentication

copyright:

Copyright (c) 2018-2019 RadiaSoft LLC. All Rights Reserved.

license:

http://www.apache.org/licenses/LICENSE-2.0.html

sirepo.auth.LOGIN_ROUTE_NAME = 'login'

what routeName to return in the event user is logged out in require_user

sirepo.auth.METHOD_EMAIL = 'email'

Email is used by moderation. Do not use this var, use qcall.auth.METHOD_EMAIL

sirepo.auth.METHOD_GUEST = 'guest'

Guest is a special method. Do not use this var, use qcall.auth.METHOD_GUEST

sirepo.auth.init_module(**imports)[source]
sirepo.auth.init_quest(qcall, internal_req=None)[source]

Under development

Parameters:
  • qcall (quest.API) – context for APIs and CLIs

  • internal_req (object) – context of web framework, pkcli, unit test, etc.

sirepo.auth.non_guest_methods = None

visible_methods excluding guest

sirepo.auth.only_for_api_method_modules()[source]
sirepo.auth.valid_methods = None

methods + deprecated_methods

sirepo.auth.visible_methods = None

Methods that the user is allowed to see

Submodules

sirepo.auth.basic module

HTTP Basic Auth Login

copyright:

Copyright (c) 2019 Bivio Software, Inc. All Rights Reserved.

license:

http://www.apache.org/licenses/LICENSE-2.0.html

sirepo.auth.basic.AUTH_METHOD_VISIBLE = False

bots only

sirepo.auth.basic.init_apis(*args, **kwargs)[source]
sirepo.auth.basic.require_user(qcall)[source]

Check for basic auth credentials against cfg

sirepo.auth.bluesky module

sirepo.auth.email module

Email login

copyright:

Copyright (c) 2018-2019 RadiaSoft LLC. All Rights Reserved.

license:

http://www.apache.org/licenses/LICENSE-2.0.html

class sirepo.auth.email.API(in_pkcli=False)[source]

Bases: API

api_admUsers(**kwargs)
api_authEmailAuthorized(**kwargs)
api_authEmailLogin(**kwargs)
sirepo.auth.email.AUTH_METHOD_VISIBLE = True

User can see it

sirepo.auth.email.UserModel = 'AuthEmailUser'

Well known alias for auth

sirepo.auth.email.avatar_uri(qcall, model, size)[source]
sirepo.auth.email.init_apis(*args, **kwargs)[source]
sirepo.auth.email.this_module = <module 'sirepo.auth.email' from '/home/docs/checkouts/readthedocs.org/user_builds/sirepo/checkouts/latest/sirepo/auth/email.py'>

module handle

sirepo.auth.guest module

Guest login

copyright:

Copyright (c) 2019 RadiaSoft LLC. All Rights Reserved.

license:

http://www.apache.org/licenses/LICENSE-2.0.html

class sirepo.auth.guest.API(in_pkcli=False)[source]

Bases: API

api_authGuestLogin(**kwargs)
sirepo.auth.guest.AUTH_METHOD_VISIBLE = True

User can see it

sirepo.auth.guest.this_module = <module 'sirepo.auth.guest' from '/home/docs/checkouts/readthedocs.org/user_builds/sirepo/checkouts/latest/sirepo/auth/guest.py'>

module handle

sirepo.auth.ldap module

LDAP authentication support

copyright:

Copyright (c) 2022-2023 RadiaSoft LLC. All Rights Reserved.

license:

http://www.apache.org/licenses/LICENSE-2.0.html

class sirepo.auth.ldap.API(in_pkcli=False)[source]

Bases: API

api_authLdapLogin(**kwargs)
sirepo.auth.ldap.init_apis(*args, **kwargs)[source]
sirepo.auth.ldap.this_module = <module 'sirepo.auth.ldap' from '/home/docs/checkouts/readthedocs.org/user_builds/sirepo/checkouts/latest/sirepo/auth/ldap.py'>

module handle