class Stytch::ConnectedApp::Clients::Secrets
def initialize(connection)
def initialize(connection) @connection = connection end
def rotate(
The HTTP status code of the response. Stytch follows standard HTTP response status code patterns, e.g. 2XX values equate to success, 3XX values are redirects, 4XX are client errors, and 5XX are server errors.
status_code::
The type of this field is +ConnectedApp+ (+object+).
The Connected App affected by this operation.
connected_app::
The type of this field is +String+.
Globally unique UUID that is returned with every API call. This value is important to log for debugging purposes; we may ask for this value to help identify a specific API call when helping you debug an issue.
request_id::
An object with the following fields:
== Returns:
The type of this field is +String+.
The ID of the client.
client_id::
== Parameters:
After this endpoint is called, the client's `next_client_secret` becomes its `client_secret` and the previous `client_secret` will no longer be valid.
Complete the rotation of a Connected App client secret started with the Rotate Secret Start Endpoint.
def rotate( client_id: ) headers = {} request = {} post_request("/v1/connected_apps/clients/#{client_id}/secrets/rotate", request, headers) end
def rotate_cancel(
The HTTP status code of the response. Stytch follows standard HTTP response status code patterns, e.g. 2XX values equate to success, 3XX values are redirects, 4XX are client errors, and 5XX are server errors.
status_code::
The type of this field is +ConnectedApp+ (+object+).
The Connected App affected by this operation.
connected_app::
The type of this field is +String+.
Globally unique UUID that is returned with every API call. This value is important to log for debugging purposes; we may ask for this value to help identify a specific API call when helping you debug an issue.
request_id::
An object with the following fields:
== Returns:
The type of this field is +String+.
The ID of the client.
client_id::
== Parameters:
Cancel the rotation of a Connected App client secret started with the Start Secret Rotation Endpoint. After this endpoint is called, the client's `next_client_secret` is discarded and only the original `client_secret` will be valid.
def rotate_cancel( client_id: ) headers = {} request = {} post_request("/v1/connected_apps/clients/#{client_id}/secrets/rotate/cancel", request, headers) end
def rotate_start(
The HTTP status code of the response. Stytch follows standard HTTP response status code patterns, e.g. 2XX values equate to success, 3XX values are redirects, 4XX are client errors, and 5XX are server errors.
status_code::
The type of this field is +ConnectedAppWithNextClientSecret+ (+object+).
The Connected App affected by this operation.
connected_app::
The type of this field is +String+.
Globally unique UUID that is returned with every API call. This value is important to log for debugging purposes; we may ask for this value to help identify a specific API call when helping you debug an issue.
request_id::
An object with the following fields:
== Returns:
The type of this field is +String+.
The ID of the client.
client_id::
== Parameters:
**Important:** This is the only time you will be able to view the generated `next_client_secret` in the API response. Stytch stores a hash of the `next_client_secret` and cannot recover the value if lost. Be sure to persist the `next_client_secret` in a secure location. If the `next_client_secret` is lost, you will need to trigger a secret rotation flow to receive another one.
Secret rotation can be cancelled using the Cancel Secret Rotation endpoint.
Initiate the rotation of a Connected App client secret. After this endpoint is called, both the client's `client_secret` and `next_client_secret` will be valid. To complete the secret rotation flow, update all usages of `client_secret` to `next_client_secret` and call the Rotate Secret Endpoint to complete the flow.
def rotate_start( client_id: ) headers = {} request = {} post_request("/v1/connected_apps/clients/#{client_id}/secrets/rotate/start", request, headers) end