Skip to content
This repository was archived by the owner on Jan 16, 2026. It is now read-only.

Conversation

@tdeshong
Copy link
Contributor

@tdeshong tdeshong commented Nov 20, 2024

What's New?

Deprecates user methods and introduces replacement methods.

Deprecated methods

- Passage(app_id, api_key="", auth_strategy=COOKIE_AUTH)
- Passage.getApp() -> Union[AppInfo, PassageError]
- Passage.authenticateJWT(token:str) -> Union[str, PassageError]
- Passage.authenticateRequest(request: Request) -> Union[str, PassageError]
- Passage.createMagicLink(magicLinkAttributes: CreateMagicLinkRequest): MagicLink
- Passage.getUser(user_id: str) -> Union[UserInfo, PassageError]
- Passage.getUserByIdentifier(userIdentifier: str) -> Union[UserInfo, PassageError]
- Passage.activateUser(user_id: str) -> Union[UserInfo, PassageError]
- Passage.deactivateUser(user_id: str) -> Union[UserInfo, PassageError]
- Passage.updateUser(user_id: str, attributes: UpdateUserRequest) -> Union[UserInfo, PassageError]
- Passage.createUser(userAttributes: CreateUserRequest) -> Union[UserInfo, PassageError]
- Passage.deleteUser(user_id: str) -> Union[bool, PassageError]
- Passage.listUserDevices(user_id: str) -> Union[List[WebAuthnDevices], PassageError]
- Passage.deleteUserDevice(user_id: str, device_id: str) -> Union[bool, PassageError]
- Passage.revokeUserDevice(user_id: str, device_id: str) -> Union[bool, PassageError]
- Passage.revokeUserRefreshTokens(user_id: str) -> Union[bool, PassageError]
- Passage.signOut(user_id: str, ) -> Union[bool, PassageError]

Added new methods

- Passage(app_id: str, api_key: str) -> None
- Passage.auth.create_magic_link(args: MagicLinkArgs, options: MagicLinkOptions | None = None) -> MagicLink
- Passage.auth.validate_jwt(jwt: str) -> str
- Passage.user.get(user_id: str) -> PassageUser
- Passage.user.get_by_identifier(identifier: str) -> PassageUser
- Passage.user.activate(user_id: str) -> PassageUser
- Passage.user.deactivate(user_id: str) -> PassageUser
- Passage.user.update(user_id: str, options: UpdateUserArgs) -> PassageUser
- Passage.user.delete(user_id: str) -> None
- Passage.user.create(args: CreateUserArgs) -> PassageUser
- Passage.user.list_devices(user_id: str) -> list[WebAuthnDevices]
- Passage.user.revoke_device(user_id: str, device_id: str) -> None
- Passage.user.revoke_refresh_tokens(user_id: str) -> None

Screenshots (if appropriate):

Type of change

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • Documentation update

Checklist:

  • My code follows the style guidelines of this project
  • I have performed a self-review of my own code
  • I have manually tested my code thoroughly
  • I have added/updated inline documentation for public facing interfaces if relevant
  • My changes generate no new warnings
  • I have added tests that prove my fix is effective or that my feature works
  • New and existing integration and unit tests pass locally with my changes
  • Any dependent changes have been merged and published in downstream modules

Additional context

@tdeshong tdeshong changed the title Psg 5152 new class new method feat: Psg 5152 new class new method Nov 20, 2024
@tdeshong tdeshong changed the title feat: Psg 5152 new class new method feat: new class new method Nov 21, 2024
@tdeshong tdeshong marked this pull request as ready for review November 21, 2024 17:33
@tdeshong tdeshong requested a review from ctran88 November 21, 2024 17:33
@ctran88 ctran88 force-pushed the PSG-5152-new-class-new-method branch from 9c382bb to 833100d Compare November 26, 2024 01:41
@ctran88 ctran88 changed the base branch from main to PSG-5424-stricter-ruff November 26, 2024 01:41
@ctran88 ctran88 force-pushed the PSG-5152-new-class-new-method branch 4 times, most recently from 1443b94 to 7cf550e Compare November 26, 2024 02:48
@ctran88 ctran88 requested a review from a team November 26, 2024 18:10
@ctran88 ctran88 changed the title feat: new class new method feat: add new method signatures Nov 26, 2024
@ctran88 ctran88 force-pushed the PSG-5424-stricter-ruff branch from f7a0aaf to 154e399 Compare November 27, 2024 20:26
Base automatically changed from PSG-5424-stricter-ruff to main November 27, 2024 20:40
@ctran88 ctran88 force-pushed the PSG-5152-new-class-new-method branch from 9e31ee4 to 62e2fc7 Compare November 27, 2024 20:52
@sonarqubecloud
Copy link

@ctran88 ctran88 merged commit 9246e3c into main Dec 5, 2024
5 checks passed
@ctran88 ctran88 deleted the PSG-5152-new-class-new-method branch December 5, 2024 22:27
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants