Skip to content

Ror sdk release11.7.0 #26

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Apr 1, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
34 changes: 34 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,40 @@
> **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)


# Version 11.6.0

**Release Date:** March 29, 2025

## Enhancements

We've introduced a brand-new set of Webhook APIs, designed with enhanced functionality and flexibility. These new APIs support advanced features including:

- Custom header configuration
- Query parameter support
- Webhook authentication methods (Bearer Token and Basic Auth)
- Support for a custom `Name` parameter to label each webhook subscription

As part of this upgrade, the legacy Webhook APIs have been deprecated in favor of the new, more robust versions.

## Newly Added APIs

- `get_webhook_subscription_detail` – Retrieve detailed information about a specific webhook subscription
- `create_webhook_subscription` – Create a new webhook subscription with advanced configuration options
- `delete_webhook_subscription` – Remove an existing webhook subscription
- `update_webhook_subscription` – Modify an existing webhook subscription
- `list_all_webhooks` – Retrieve a list of all configured webhook subscriptions
- `get_webhook_events` – Fetch available webhook events supported by the system

## Deprecated APIs

The following legacy APIs have been deprecated:

- `web_hook_subscribe`
- `webhook_test`
- `web_hook_unsubscribe`
- `get_web_hook_subscribed_u_r_ls`


# Version 11.5.0
Release on January 20, 2023

Expand Down
2 changes: 1 addition & 1 deletion LICENSE
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
Copyright (c) 2022 LoginRadius Inc.
Copyright (c) 2025 LoginRadius Inc.

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
Expand Down
319 changes: 297 additions & 22 deletions README.md

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion demo/vendor/gems/login_radius/LICENSE
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
Copyright (c) 2022 LoginRadius Inc.
Copyright (c) 2025 LoginRadius Inc.

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
Expand Down
2 changes: 1 addition & 1 deletion demo/vendor/gems/login_radius/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
Install the SDK by adding LoginRadius to your application's `Gemfile`.

```shell
gem 'login_radius', '~> 11.5.0'
gem 'login_radius', '~> 11.6.0'
```

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).
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# frozen_string_literal: true

# Created by LoginRadius Development Team
# Copyright 2019 LoginRadius Inc. All rights reserved.
# Copyright 2025 LoginRadius Inc. All rights reserved.
require_relative '../../request_client'

module LoginRadius
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# frozen_string_literal: true

# Created by LoginRadius Development Team
# Copyright 2019 LoginRadius Inc. All rights reserved.
# Copyright 2025 LoginRadius Inc. All rights reserved.
require_relative '../../request_client'

module LoginRadius
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# frozen_string_literal: true

# Created by LoginRadius Development Team
# Copyright 2019 LoginRadius Inc. All rights reserved.
# Copyright 2025 LoginRadius Inc. All rights reserved.
require_relative '../../request_client'

module LoginRadius
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# frozen_string_literal: true

# Created by LoginRadius Development Team
# Copyright 2019 LoginRadius Inc. All rights reserved.
# Copyright 2025 LoginRadius Inc. All rights reserved.
require_relative '../../request_client'

module LoginRadius
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# frozen_string_literal: true

# Created by LoginRadius Development Team
# Copyright 2019 LoginRadius Inc. All rights reserved.
# Copyright 2025 LoginRadius Inc. All rights reserved.
require_relative '../../request_client'

module LoginRadius
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# frozen_string_literal: true

# Created by LoginRadius Development Team
# Copyright 2019 LoginRadius Inc. All rights reserved.
# Copyright 2025 LoginRadius Inc. All rights reserved.
require_relative '../../request_client'

module LoginRadius
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# frozen_string_literal: true

# Created by LoginRadius Development Team
# Copyright 2019 LoginRadius Inc. All rights reserved.
# Copyright 2025 LoginRadius Inc. All rights reserved.
require_relative '../../request_client'

module LoginRadius
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# frozen_string_literal: true

# Created by LoginRadius Development Team
# Copyright 2019 LoginRadius Inc. All rights reserved.
# Copyright 2025 LoginRadius Inc. All rights reserved.
require_relative '../../request_client'

module LoginRadius
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# frozen_string_literal: true

# Created by LoginRadius Development Team
# Copyright 2019 LoginRadius Inc. All rights reserved.
# Copyright 2025 LoginRadius Inc. All rights reserved.
require_relative '../../request_client'

module LoginRadius
Expand All @@ -25,33 +25,32 @@ def initialize
unless @api_secret != '' && @api_secret != nil
end

# This API is used to fatch all the subscribed URLs, for particular event
# This API is used to get details of a webhook subscription by Id
#
# @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
# @param hook_id - Unique ID of the webhook
#
# @return Response Containing List of Webhhook Data
# @return Response containing Definition for Complete WebHook data
# 40.1
def get_web_hook_subscribed_u_r_ls(event)
if isNullOrWhiteSpace(event)
raise LoginRadius::Error.new, getValidationMessage('event')
def get_webhook_subscription_detail(hook_id)
if isNullOrWhiteSpace(hook_id)
raise LoginRadius::Error.new, getValidationMessage('hook_id')
end

query_parameters = {}
query_parameters['apikey'] = @api_key
query_parameters['apisecret'] = @api_secret
query_parameters['event'] = event

resource_path = 'api/v2/webhook'
resource_path = 'v2/manage/webhooks/' + hook_id
get_request(resource_path, query_parameters, {})
end

# 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.
# This API is used to create a new webhook subscription on your LoginRadius site.
#
# @param web_hook_subscribe_model - Model Class containing Definition of payload for Webhook Subscribe API
#
# @return Response containing Definition of Complete Validation data
# @return Response containing Definition for Complete WebHook data
# 40.2
def web_hook_subscribe(web_hook_subscribe_model)
def create_webhook_subscription(web_hook_subscribe_model)
if web_hook_subscribe_model.blank?
raise LoginRadius::Error.new, getValidationMessage('web_hook_subscribe_model')
end
Expand All @@ -60,42 +59,80 @@ def web_hook_subscribe(web_hook_subscribe_model)
query_parameters['apikey'] = @api_key
query_parameters['apisecret'] = @api_secret

resource_path = 'api/v2/webhook'
resource_path = 'v2/manage/webhooks'
post_request(resource_path, query_parameters, web_hook_subscribe_model)
end

# API can be used to test a subscribed WebHook.
# This API is used to delete webhook subscription
#
# @param hook_id - Unique ID of the webhook
#
# @return Response containing Definition of Complete Validation data
# @return Response containing Definition of Delete Request
# 40.3
def webhook_test()
def delete_webhook_subscription(hook_id)
if isNullOrWhiteSpace(hook_id)
raise LoginRadius::Error.new, getValidationMessage('hook_id')
end

query_parameters = {}
query_parameters['apikey'] = @api_key
query_parameters['apisecret'] = @api_secret

resource_path = 'api/v2/webhook/test'
get_request(resource_path, query_parameters, {})
resource_path = 'v2/manage/webhooks/' + hook_id
delete_request(resource_path, query_parameters, {})
end

# API can be used to unsubscribe a WebHook configured on your LoginRadius site.
# This API is used to update a webhook subscription
#
# @param web_hook_subscribe_model - Model Class containing Definition of payload for Webhook Subscribe API
# @param hook_id - Unique ID of the webhook
# @param web_hook_subscription_update_model - Model Class containing Definition for WebHookSubscriptionUpdateModel Property
#
# @return Response containing Definition of Delete Request
# @return Response containing Definition for Complete WebHook data
# 40.4
def web_hook_unsubscribe(web_hook_subscribe_model)
if web_hook_subscribe_model.blank?
raise LoginRadius::Error.new, getValidationMessage('web_hook_subscribe_model')
def update_webhook_subscription(hook_id, web_hook_subscription_update_model)
if isNullOrWhiteSpace(hook_id)
raise LoginRadius::Error.new, getValidationMessage('hook_id')
end
if web_hook_subscription_update_model.blank?
raise LoginRadius::Error.new, getValidationMessage('web_hook_subscription_update_model')
end

query_parameters = {}
query_parameters['apikey'] = @api_key
query_parameters['apisecret'] = @api_secret

resource_path = 'v2/manage/webhooks/' + hook_id
put_request(resource_path, query_parameters, web_hook_subscription_update_model)
end

# This API is used to get the list of all the webhooks
#
#
# @return Response Containing List of Webhhook Data
# 40.5
def list_all_webhooks()

query_parameters = {}
query_parameters['apikey'] = @api_key
query_parameters['apisecret'] = @api_secret

resource_path = 'api/v2/webhook'
delete_request(resource_path, query_parameters, web_hook_subscribe_model)
resource_path = 'v2/manage/webhooks'
get_request(resource_path, query_parameters, {})
end

# This API is used to retrieve all the webhook events.
#
#
# @return Model Class containing Definition for WebHookEventModel Property
# 40.6
def get_webhook_events()

query_parameters = {}
query_parameters['apikey'] = @api_key
query_parameters['apisecret'] = @api_secret

resource_path = 'v2/manage/webhooks/events'
get_request(resource_path, query_parameters, {})
end
end
end
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# frozen_string_literal: true

# Created by LoginRadius Development Team
# Copyright 2019 LoginRadius Inc. All rights reserved.
# Copyright 2025 LoginRadius Inc. All rights reserved.
require_relative '../../request_client'

module LoginRadius
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# frozen_string_literal: true

# Created by LoginRadius Development Team
# Copyright 2019 LoginRadius Inc. All rights reserved.
# Copyright 2025 LoginRadius Inc. All rights reserved.
require_relative '../../request_client'

module LoginRadius
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# frozen_string_literal: true

# Created by LoginRadius Development Team
# Copyright 2019 LoginRadius Inc. All rights reserved.
# Copyright 2025 LoginRadius Inc. All rights reserved.
require_relative '../../request_client'

module LoginRadius
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# frozen_string_literal: true

# Created by LoginRadius Development Team
# Copyright 2019 LoginRadius Inc. All rights reserved.
# Copyright 2025 LoginRadius Inc. All rights reserved.
require_relative '../../request_client'

module LoginRadius
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# frozen_string_literal: true

# Created by LoginRadius Development Team
# Copyright 2019 LoginRadius Inc. All rights reserved.
# Copyright 2025 LoginRadius Inc. All rights reserved.
require_relative '../../request_client'

module LoginRadius
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# frozen_string_literal: true

# Created by LoginRadius Development Team
# Copyright 2019 LoginRadius Inc. All rights reserved.
# Copyright 2025 LoginRadius Inc. All rights reserved.
require_relative '../../request_client'

module LoginRadius
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# frozen_string_literal: true

# Created by LoginRadius Development Team
# Copyright 2019 LoginRadius Inc. All rights reserved.
# Copyright 2025 LoginRadius Inc. All rights reserved.
require_relative '../../request_client'

module LoginRadius
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# frozen_string_literal: true

# Created by LoginRadius Development Team
# Copyright 2019 LoginRadius Inc. All rights reserved.
# Copyright 2025 LoginRadius Inc. All rights reserved.
require_relative '../../request_client'

module LoginRadius
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# frozen_string_literal: true

# Created by LoginRadius Development Team
# Copyright 2019 LoginRadius Inc. All rights reserved.
# Copyright 2025 LoginRadius Inc. All rights reserved.
require_relative '../../request_client'

module LoginRadius
Expand Down
2 changes: 1 addition & 1 deletion demo/vendor/gems/login_radius/lib/login_radius/version.rb
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
module LoginRadius
VERSION = "11.5.0"
VERSION = "11.6.0"
end
2 changes: 1 addition & 1 deletion sdk/src/login_radius/LICENSE
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
Copyright (c) 2022 LoginRadius Inc.
Copyright (c) 2025 LoginRadius Inc.

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
Expand Down
2 changes: 1 addition & 1 deletion sdk/src/login_radius/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
Install the SDK by adding LoginRadius to your application's `Gemfile`.

```shell
gem 'login_radius', '~> 11.5.0'
gem 'login_radius', '~> 11.6.0'
```

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).
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# frozen_string_literal: true

# Created by LoginRadius Development Team
# Copyright 2019 LoginRadius Inc. All rights reserved.
# Copyright 2025 LoginRadius Inc. All rights reserved.
require_relative '../../request_client'

module LoginRadius
Expand Down
Loading
Loading