Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add get_register_relative_url #35

Merged
merged 1 commit into from
Aug 14, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 8 additions & 0 deletions python/calypsso/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,14 @@ def get_reset_password_relative_url(reset_token: str) -> str:
return f"calypsso/reset-password/?{urllib.parse.urlencode(exclude_none(params))}"


def get_register_relative_url(external: bool) -> str:
"""
Return CalypSSO register page relative url: `calypsso/register?external=...`
"""
params = {"external": external}
return f"calypsso/register/?{urllib.parse.urlencode(exclude_none(params))}"


def get_activate_relative_url(activation_token: str, external: bool) -> str:
"""
Return CalypSSO account activation page relative url: `calypsso/activate?activation_code=...`
Expand Down