Skip to content

Commit 0dc75de

Browse files
authored
Merge pull request #26 from LoginRadius/ror-sdk-release11.7.0
Ror sdk release11.7.0
2 parents 306ed0f + 41aea01 commit 0dc75de

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

45 files changed

+498
-115
lines changed

CHANGELOG.md

Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,40 @@
11
> **LoginRadius Ruby On Rails SDK Change Log** provides information regarding what has changed, more specifically what changes, improvements and bug fix has been made to the SDK. For more details please refer to the [LoginRadius API Documention](https://docs.loginradius.com/api/v2/sdk-libraries/ruby)
22
33

4+
# Version 11.6.0
5+
6+
**Release Date:** March 29, 2025
7+
8+
## Enhancements
9+
10+
We've introduced a brand-new set of Webhook APIs, designed with enhanced functionality and flexibility. These new APIs support advanced features including:
11+
12+
- Custom header configuration
13+
- Query parameter support
14+
- Webhook authentication methods (Bearer Token and Basic Auth)
15+
- Support for a custom `Name` parameter to label each webhook subscription
16+
17+
As part of this upgrade, the legacy Webhook APIs have been deprecated in favor of the new, more robust versions.
18+
19+
## Newly Added APIs
20+
21+
- `get_webhook_subscription_detail` – Retrieve detailed information about a specific webhook subscription
22+
- `create_webhook_subscription` – Create a new webhook subscription with advanced configuration options
23+
- `delete_webhook_subscription` – Remove an existing webhook subscription
24+
- `update_webhook_subscription` – Modify an existing webhook subscription
25+
- `list_all_webhooks` – Retrieve a list of all configured webhook subscriptions
26+
- `get_webhook_events` – Fetch available webhook events supported by the system
27+
28+
## Deprecated APIs
29+
30+
The following legacy APIs have been deprecated:
31+
32+
- `web_hook_subscribe`
33+
- `webhook_test`
34+
- `web_hook_unsubscribe`
35+
- `get_web_hook_subscribed_u_r_ls`
36+
37+
438
# Version 11.5.0
539
Release on January 20, 2023
640

LICENSE

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
Copyright (c) 2022 LoginRadius Inc.
1+
Copyright (c) 2025 LoginRadius Inc.
22

33
Permission is hereby granted, free of charge, to any person obtaining a copy
44
of this software and associated documentation files (the "Software"), to deal

README.md

Lines changed: 297 additions & 22 deletions
Large diffs are not rendered by default.

demo/vendor/gems/login_radius/LICENSE

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
Copyright (c) 2022 LoginRadius Inc.
1+
Copyright (c) 2025 LoginRadius Inc.
22

33
Permission is hereby granted, free of charge, to any person obtaining a copy
44
of this software and associated documentation files (the "Software"), to deal

demo/vendor/gems/login_radius/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
Install the SDK by adding LoginRadius to your application's `Gemfile`.
44

55
```shell
6-
gem 'login_radius', '~> 11.5.0'
6+
gem 'login_radius', '~> 11.6.0'
77
```
88

99
Then, run `$ bundle`. A copy of the SDK can also be found on our [Github](https://github.com/LoginRadius/ruby-on-rails-gem/tree/master).

demo/vendor/gems/login_radius/lib/login_radius/api/account/account_api.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
# frozen_string_literal: true
22

33
# Created by LoginRadius Development Team
4-
# Copyright 2019 LoginRadius Inc. All rights reserved.
4+
# Copyright 2025 LoginRadius Inc. All rights reserved.
55
require_relative '../../request_client'
66

77
module LoginRadius

demo/vendor/gems/login_radius/lib/login_radius/api/account/role_api.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
# frozen_string_literal: true
22

33
# Created by LoginRadius Development Team
4-
# Copyright 2019 LoginRadius Inc. All rights reserved.
4+
# Copyright 2025 LoginRadius Inc. All rights reserved.
55
require_relative '../../request_client'
66

77
module LoginRadius

demo/vendor/gems/login_radius/lib/login_radius/api/account/sott_api.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
# frozen_string_literal: true
22

33
# Created by LoginRadius Development Team
4-
# Copyright 2019 LoginRadius Inc. All rights reserved.
4+
# Copyright 2025 LoginRadius Inc. All rights reserved.
55
require_relative '../../request_client'
66

77
module LoginRadius

demo/vendor/gems/login_radius/lib/login_radius/api/advanced/configuration_api.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
# frozen_string_literal: true
22

33
# Created by LoginRadius Development Team
4-
# Copyright 2019 LoginRadius Inc. All rights reserved.
4+
# Copyright 2025 LoginRadius Inc. All rights reserved.
55
require_relative '../../request_client'
66

77
module LoginRadius

demo/vendor/gems/login_radius/lib/login_radius/api/advanced/consent_management_api.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
# frozen_string_literal: true
22

33
# Created by LoginRadius Development Team
4-
# Copyright 2019 LoginRadius Inc. All rights reserved.
4+
# Copyright 2025 LoginRadius Inc. All rights reserved.
55
require_relative '../../request_client'
66

77
module LoginRadius

demo/vendor/gems/login_radius/lib/login_radius/api/advanced/custom_object_api.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
# frozen_string_literal: true
22

33
# Created by LoginRadius Development Team
4-
# Copyright 2019 LoginRadius Inc. All rights reserved.
4+
# Copyright 2025 LoginRadius Inc. All rights reserved.
55
require_relative '../../request_client'
66

77
module LoginRadius

demo/vendor/gems/login_radius/lib/login_radius/api/advanced/multi_factor_authentication_api.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
# frozen_string_literal: true
22

33
# Created by LoginRadius Development Team
4-
# Copyright 2019 LoginRadius Inc. All rights reserved.
4+
# Copyright 2025 LoginRadius Inc. All rights reserved.
55
require_relative '../../request_client'
66

77
module LoginRadius

demo/vendor/gems/login_radius/lib/login_radius/api/advanced/re_authentication_api.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
# frozen_string_literal: true
22

33
# Created by LoginRadius Development Team
4-
# Copyright 2019 LoginRadius Inc. All rights reserved.
4+
# Copyright 2025 LoginRadius Inc. All rights reserved.
55
require_relative '../../request_client'
66

77
module LoginRadius
Lines changed: 63 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
# frozen_string_literal: true
22

33
# Created by LoginRadius Development Team
4-
# Copyright 2019 LoginRadius Inc. All rights reserved.
4+
# Copyright 2025 LoginRadius Inc. All rights reserved.
55
require_relative '../../request_client'
66

77
module LoginRadius
@@ -25,33 +25,32 @@ def initialize
2525
unless @api_secret != '' && @api_secret != nil
2626
end
2727

28-
# This API is used to fatch all the subscribed URLs, for particular event
28+
# This API is used to get details of a webhook subscription by Id
2929
#
30-
# @param event - Allowed events: Login, Register, UpdateProfile, ResetPassword, ChangePassword, emailVerification, AddEmail, RemoveEmail, BlockAccount, DeleteAccount, SetUsername, AssignRoles, UnassignRoles, SetPassword, LinkAccount, UnlinkAccount, UpdatePhoneId, VerifyPhoneNumber, CreateCustomObject, UpdateCustomobject, DeleteCustomObject
30+
# @param hook_id - Unique ID of the webhook
3131
#
32-
# @return Response Containing List of Webhhook Data
32+
# @return Response containing Definition for Complete WebHook data
3333
# 40.1
34-
def get_web_hook_subscribed_u_r_ls(event)
35-
if isNullOrWhiteSpace(event)
36-
raise LoginRadius::Error.new, getValidationMessage('event')
34+
def get_webhook_subscription_detail(hook_id)
35+
if isNullOrWhiteSpace(hook_id)
36+
raise LoginRadius::Error.new, getValidationMessage('hook_id')
3737
end
3838

3939
query_parameters = {}
4040
query_parameters['apikey'] = @api_key
4141
query_parameters['apisecret'] = @api_secret
42-
query_parameters['event'] = event
4342

44-
resource_path = 'api/v2/webhook'
43+
resource_path = 'v2/manage/webhooks/' + hook_id
4544
get_request(resource_path, query_parameters, {})
4645
end
4746

48-
# API can be used to configure a WebHook on your LoginRadius site. Webhooks also work on subscribe and notification model, subscribe your hook and get a notification. Equivalent to RESThook but these provide security on basis of signature and RESThook work on unique URL. Following are the events that are allowed by LoginRadius to trigger a WebHook service call.
47+
# This API is used to create a new webhook subscription on your LoginRadius site.
4948
#
5049
# @param web_hook_subscribe_model - Model Class containing Definition of payload for Webhook Subscribe API
5150
#
52-
# @return Response containing Definition of Complete Validation data
51+
# @return Response containing Definition for Complete WebHook data
5352
# 40.2
54-
def web_hook_subscribe(web_hook_subscribe_model)
53+
def create_webhook_subscription(web_hook_subscribe_model)
5554
if web_hook_subscribe_model.blank?
5655
raise LoginRadius::Error.new, getValidationMessage('web_hook_subscribe_model')
5756
end
@@ -60,42 +59,80 @@ def web_hook_subscribe(web_hook_subscribe_model)
6059
query_parameters['apikey'] = @api_key
6160
query_parameters['apisecret'] = @api_secret
6261

63-
resource_path = 'api/v2/webhook'
62+
resource_path = 'v2/manage/webhooks'
6463
post_request(resource_path, query_parameters, web_hook_subscribe_model)
6564
end
6665

67-
# API can be used to test a subscribed WebHook.
66+
# This API is used to delete webhook subscription
6867
#
68+
# @param hook_id - Unique ID of the webhook
6969
#
70-
# @return Response containing Definition of Complete Validation data
70+
# @return Response containing Definition of Delete Request
7171
# 40.3
72-
def webhook_test()
72+
def delete_webhook_subscription(hook_id)
73+
if isNullOrWhiteSpace(hook_id)
74+
raise LoginRadius::Error.new, getValidationMessage('hook_id')
75+
end
7376

7477
query_parameters = {}
7578
query_parameters['apikey'] = @api_key
7679
query_parameters['apisecret'] = @api_secret
7780

78-
resource_path = 'api/v2/webhook/test'
79-
get_request(resource_path, query_parameters, {})
81+
resource_path = 'v2/manage/webhooks/' + hook_id
82+
delete_request(resource_path, query_parameters, {})
8083
end
8184

82-
# API can be used to unsubscribe a WebHook configured on your LoginRadius site.
85+
# This API is used to update a webhook subscription
8386
#
84-
# @param web_hook_subscribe_model - Model Class containing Definition of payload for Webhook Subscribe API
87+
# @param hook_id - Unique ID of the webhook
88+
# @param web_hook_subscription_update_model - Model Class containing Definition for WebHookSubscriptionUpdateModel Property
8589
#
86-
# @return Response containing Definition of Delete Request
90+
# @return Response containing Definition for Complete WebHook data
8791
# 40.4
88-
def web_hook_unsubscribe(web_hook_subscribe_model)
89-
if web_hook_subscribe_model.blank?
90-
raise LoginRadius::Error.new, getValidationMessage('web_hook_subscribe_model')
92+
def update_webhook_subscription(hook_id, web_hook_subscription_update_model)
93+
if isNullOrWhiteSpace(hook_id)
94+
raise LoginRadius::Error.new, getValidationMessage('hook_id')
9195
end
96+
if web_hook_subscription_update_model.blank?
97+
raise LoginRadius::Error.new, getValidationMessage('web_hook_subscription_update_model')
98+
end
99+
100+
query_parameters = {}
101+
query_parameters['apikey'] = @api_key
102+
query_parameters['apisecret'] = @api_secret
103+
104+
resource_path = 'v2/manage/webhooks/' + hook_id
105+
put_request(resource_path, query_parameters, web_hook_subscription_update_model)
106+
end
107+
108+
# This API is used to get the list of all the webhooks
109+
#
110+
#
111+
# @return Response Containing List of Webhhook Data
112+
# 40.5
113+
def list_all_webhooks()
92114

93115
query_parameters = {}
94116
query_parameters['apikey'] = @api_key
95117
query_parameters['apisecret'] = @api_secret
96118

97-
resource_path = 'api/v2/webhook'
98-
delete_request(resource_path, query_parameters, web_hook_subscribe_model)
119+
resource_path = 'v2/manage/webhooks'
120+
get_request(resource_path, query_parameters, {})
121+
end
122+
123+
# This API is used to retrieve all the webhook events.
124+
#
125+
#
126+
# @return Model Class containing Definition for WebHookEventModel Property
127+
# 40.6
128+
def get_webhook_events()
129+
130+
query_parameters = {}
131+
query_parameters['apikey'] = @api_key
132+
query_parameters['apisecret'] = @api_secret
133+
134+
resource_path = 'v2/manage/webhooks/events'
135+
get_request(resource_path, query_parameters, {})
99136
end
100137
end
101138
end

demo/vendor/gems/login_radius/lib/login_radius/api/authentication/authentication_api.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
# frozen_string_literal: true
22

33
# Created by LoginRadius Development Team
4-
# Copyright 2019 LoginRadius Inc. All rights reserved.
4+
# Copyright 2025 LoginRadius Inc. All rights reserved.
55
require_relative '../../request_client'
66

77
module LoginRadius

demo/vendor/gems/login_radius/lib/login_radius/api/authentication/one_touch_login_api.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
# frozen_string_literal: true
22

33
# Created by LoginRadius Development Team
4-
# Copyright 2019 LoginRadius Inc. All rights reserved.
4+
# Copyright 2025 LoginRadius Inc. All rights reserved.
55
require_relative '../../request_client'
66

77
module LoginRadius

demo/vendor/gems/login_radius/lib/login_radius/api/authentication/password_less_login_api.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
# frozen_string_literal: true
22

33
# Created by LoginRadius Development Team
4-
# Copyright 2019 LoginRadius Inc. All rights reserved.
4+
# Copyright 2025 LoginRadius Inc. All rights reserved.
55
require_relative '../../request_client'
66

77
module LoginRadius

demo/vendor/gems/login_radius/lib/login_radius/api/authentication/phone_authentication_api.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
# frozen_string_literal: true
22

33
# Created by LoginRadius Development Team
4-
# Copyright 2019 LoginRadius Inc. All rights reserved.
4+
# Copyright 2025 LoginRadius Inc. All rights reserved.
55
require_relative '../../request_client'
66

77
module LoginRadius

demo/vendor/gems/login_radius/lib/login_radius/api/authentication/pin_authentication_api.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
# frozen_string_literal: true
22

33
# Created by LoginRadius Development Team
4-
# Copyright 2019 LoginRadius Inc. All rights reserved.
4+
# Copyright 2025 LoginRadius Inc. All rights reserved.
55
require_relative '../../request_client'
66

77
module LoginRadius

demo/vendor/gems/login_radius/lib/login_radius/api/authentication/risk_based_authentication_api.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
# frozen_string_literal: true
22

33
# Created by LoginRadius Development Team
4-
# Copyright 2019 LoginRadius Inc. All rights reserved.
4+
# Copyright 2025 LoginRadius Inc. All rights reserved.
55
require_relative '../../request_client'
66

77
module LoginRadius

demo/vendor/gems/login_radius/lib/login_radius/api/authentication/smart_login_api.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
# frozen_string_literal: true
22

33
# Created by LoginRadius Development Team
4-
# Copyright 2019 LoginRadius Inc. All rights reserved.
4+
# Copyright 2025 LoginRadius Inc. All rights reserved.
55
require_relative '../../request_client'
66

77
module LoginRadius

demo/vendor/gems/login_radius/lib/login_radius/api/social/native_social_api.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
# frozen_string_literal: true
22

33
# Created by LoginRadius Development Team
4-
# Copyright 2019 LoginRadius Inc. All rights reserved.
4+
# Copyright 2025 LoginRadius Inc. All rights reserved.
55
require_relative '../../request_client'
66

77
module LoginRadius

demo/vendor/gems/login_radius/lib/login_radius/api/social/social_api.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
# frozen_string_literal: true
22

33
# Created by LoginRadius Development Team
4-
# Copyright 2019 LoginRadius Inc. All rights reserved.
4+
# Copyright 2025 LoginRadius Inc. All rights reserved.
55
require_relative '../../request_client'
66

77
module LoginRadius
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
module LoginRadius
2-
VERSION = "11.5.0"
2+
VERSION = "11.6.0"
33
end

sdk/src/login_radius/LICENSE

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
Copyright (c) 2022 LoginRadius Inc.
1+
Copyright (c) 2025 LoginRadius Inc.
22

33
Permission is hereby granted, free of charge, to any person obtaining a copy
44
of this software and associated documentation files (the "Software"), to deal

sdk/src/login_radius/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
Install the SDK by adding LoginRadius to your application's `Gemfile`.
44

55
```shell
6-
gem 'login_radius', '~> 11.5.0'
6+
gem 'login_radius', '~> 11.6.0'
77
```
88

99
Then, run `$ bundle`. A copy of the SDK can also be found on our [Github](https://github.com/LoginRadius/ruby-on-rails-gem/tree/master).

sdk/src/login_radius/lib/login_radius/api/account/account_api.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
# frozen_string_literal: true
22

33
# Created by LoginRadius Development Team
4-
# Copyright 2019 LoginRadius Inc. All rights reserved.
4+
# Copyright 2025 LoginRadius Inc. All rights reserved.
55
require_relative '../../request_client'
66

77
module LoginRadius

0 commit comments

Comments
 (0)