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

feat: Psg 5154 introduce new method names#98

Merged
tdeshong merged 24 commits intomainfrom
PSG-5154-new-class-method-name
Nov 20, 2024
Merged

feat: Psg 5154 introduce new method names#98
tdeshong merged 24 commits intomainfrom
PSG-5154-new-class-method-name

Conversation

@tdeshong
Copy link
Contributor

@tdeshong tdeshong commented Nov 4, 2024

BEGIN_COMMIT_OVERRIDE
feat: add new signatures for user and auth functions
END_COMMIT_OVERRIDE

What's New?

Deprecates user methods and introduces replacement methods.

- deprecated methods
    - Passage.GetUser(userId: string): User
    - Passage.GetUserByIdentifier(identifier: string): User
    - Passage.ActivateUser(userId: string): User
    - Passage.DeactivateUser(userId: string): User
    - Passage.UpdateUser(userId: string, options: UpdateUserArgs): User
    - Passage.CreateUser(args: CreateUserArgs): User
    - Passage.DeleteUser(userId: string): boolean
    - Passage.ListUserDevices(userId: string): WebAuthnDevice[]
    - Passage.RevokeUserDevice(userId: string, deviceId: string): boolean
    - Passage.ValidateAuthToken(authToken: string): string, bool
- added new methods
    - Passage.User.Get(userId: string): User
    - Passage.User.GetByIdentifier(identifier: string): User
    - Passage.User.Activate(userId: string): User
    - Passage.User.Deactivate(userId: string): User
    - Passage.User.Update(userId: string, options: UpdateUserArgs): User
    - Passage.User.Create(args: CreateUserArgs): User
    - Passage.User.Delete(userId: string): boolean
    - Passage.User.ListDevices(userId: string): WebAuthnDevice[]
    - Passage.User.RevokeDevice(userId: string, deviceId: string): boolean
    - Passage.ValidateJwt(authToken: string): string, bool

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

@tdeshong tdeshong changed the title Psg 5154 Introduce new method names feat: Psg 5154 introduce new method names Nov 4, 2024
@tdeshong tdeshong marked this pull request as ready for review November 5, 2024 15:13
@tdeshong tdeshong requested a review from ctran88 November 5, 2024 15:14
ctran88
ctran88 previously approved these changes Nov 14, 2024
@ctran88 ctran88 dismissed their stale review November 14, 2024 17:35

accidental approval

@tdeshong tdeshong requested a review from ctran88 November 19, 2024 15:29
Copy link
Contributor

@ctran88 ctran88 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

can we change all structure of the deprecation docstrings to match what we saw with the other packages?

// NewForwardedOpenIDProvider tries to establishes the issuer from the request Host.
//
// Deprecated: use [NewProvider] with an issuer function direct.

@tdeshong tdeshong requested a review from ctran88 November 20, 2024 14:57
@sonarqubecloud
Copy link

@tdeshong tdeshong merged commit c63c75e into main Nov 20, 2024
@tdeshong tdeshong deleted the PSG-5154-new-class-method-name branch November 20, 2024 17:09
This was referenced Nov 20, 2024
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.

2 participants