Class: Lithic::Resources::AuthStreamEnrollment
- Inherits:
-
Object
- Object
- Lithic::Resources::AuthStreamEnrollment
- Defined in:
- lib/lithic/resources/auth_stream_enrollment.rb
Instance Method Summary collapse
-
#initialize(client:) ⇒ AuthStreamEnrollment
constructor
private
A new instance of AuthStreamEnrollment.
-
#retrieve_secret(request_options: {}) ⇒ Lithic::Models::AuthStreamSecret
Retrieve the ASA HMAC secret key.
-
#rotate_secret(request_options: {}) ⇒ nil
Generate a new ASA HMAC secret key.
Constructor Details
#initialize(client:) ⇒ AuthStreamEnrollment
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
Returns a new instance of AuthStreamEnrollment.
53 54 55 |
# File 'lib/lithic/resources/auth_stream_enrollment.rb', line 53 def initialize(client:) @client = client end |
Instance Method Details
#retrieve_secret(request_options: {}) ⇒ Lithic::Models::AuthStreamSecret
Retrieve the ASA HMAC secret key. If one does not exist for your program yet, calling this endpoint will create one for you. The headers (which you can use to verify webhooks) will begin appearing shortly after calling this endpoint for the first time. See [this page](docs.lithic.com/docs/auth-stream-access-asa#asa-webhook-verification) for more detail about verifying ASA webhooks.
20 21 22 23 24 25 26 27 |
# File 'lib/lithic/resources/auth_stream_enrollment.rb', line 20 def retrieve_secret(params = {}) @client.request( method: :get, path: "v1/auth_stream/secret", model: Lithic::AuthStreamSecret, options: params[:request_options] ) end |
#rotate_secret(request_options: {}) ⇒ nil
Generate a new ASA HMAC secret key. The old ASA HMAC secret key will be deactivated 24 hours after a successful request to this endpoint. Make a [‘GET /auth_stream/secret`](docs.lithic.com/reference/getauthstreamsecret) request to retrieve the new secret key.
41 42 43 44 45 46 47 48 |
# File 'lib/lithic/resources/auth_stream_enrollment.rb', line 41 def rotate_secret(params = {}) @client.request( method: :post, path: "v1/auth_stream/secret/rotate", model: NilClass, options: params[:request_options] ) end |