Skip to content

Commit

Permalink
[AUTH-3740] Sessions migrate endpoint (#132)
Browse files Browse the repository at this point in the history
* Retired Emails

* Minor version bump.

* Remove OAuth tenant code.

* Include docs fix

* sessions migrate

* re gen-all

---------

Co-authored-by: Jack Cook <[email protected]>
Co-authored-by: Evelyn Taylor-McGregor <[email protected]>
  • Loading branch information
3 people authored Jul 29, 2024
1 parent 74c7242 commit da1d6a3
Showing 1 changed file with 15 additions and 0 deletions.
15 changes: 15 additions & 0 deletions lib/stytch/sessions.rb
Original file line number Diff line number Diff line change
Expand Up @@ -156,6 +156,21 @@ def revoke(
post_request('/v1/sessions/revoke', request, headers)
end

def migrate(
session_token:,
session_duration_minutes: nil,
session_custom_claims: nil
)
headers = {}
request = {
session_token: session_token
}
request[:session_duration_minutes] = session_duration_minutes unless session_duration_minutes.nil?
request[:session_custom_claims] = session_custom_claims unless session_custom_claims.nil?

post_request('/v1/sessions/migrate', request, headers)
end

# Get the JSON Web Key Set (JWKS) for a project.
#
# JWKS are rotated every ~6 months. Upon rotation, new JWTs will be signed using the new key set, and both key sets will be returned by this endpoint for a period of 1 month.
Expand Down

0 comments on commit da1d6a3

Please sign in to comment.