fusionauth_client 1.3.0 → 1.4.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
- SHA1:
3
- metadata.gz: e1af1d4d1609856fae8d8d8a6a2a26dbc8ff013b
4
- data.tar.gz: 622bf5fc6df1e113e9b546f47fc3b582a38b114e
2
+ SHA256:
3
+ metadata.gz: dc854aa03f670febd02bb2cc779f008016db68e0ecad374cc9b645ccb0a62080
4
+ data.tar.gz: dca34dc551c1364d229afb4fd67b9606f2c910adc8f8561398bf9d3386545f01
5
5
  SHA512:
6
- metadata.gz: 5cc350be0b7397b81274060cb393c4ac45f8fa29b0cef74f0e103cb5d3150305082936aa82b00ea3cdba4d77368f45fbe417cd6256eb128246b0800f475be4d1
7
- data.tar.gz: ef7457fd9c6436e22b145988e19e66decb628ae9b0caa9fa2531ac9ce4d4f36af0e6d7cb138707e17cce8ecd4ef0abf0fc1723dda7480d3cdf8d259464befa81
6
+ metadata.gz: be763a4bd39d86f6e77914061e5f2706fa9c2e4eb065a81bf4b3d0fed595ec20ea1d42dde57347b3e2e7767ac224405a4a0b0ffcbce3105ce0c181d777bb7568
7
+ data.tar.gz: 727c58a17b14d20e2f17bf110afff8ebf10f5a08855eda3302700875fe7bbcfd770175aabdfa8b90150596be8c301b511bbdfb75db1a77bd2d39cb6e514b89fd
data/build.savant CHANGED
@@ -16,7 +16,7 @@
16
16
  savantVersion = "1.0.0"
17
17
 
18
18
  pubVersion = ""
19
- project(group: "io.fusionauth", name: "fusionauth-ruby-client", version: "1.3.0", licenses: ["ApacheV2_0"]) {
19
+ project(group: "io.fusionauth", name: "fusionauth-ruby-client", version: "1.4.0", licenses: ["ApacheV2_0"]) {
20
20
  workflow {
21
21
  standard()
22
22
  }
@@ -8,7 +8,7 @@
8
8
  </content>
9
9
  <orderEntry type="jdk" jdkName="rbenv: 2.3.1" jdkType="RUBY_SDK" />
10
10
  <orderEntry type="sourceFolder" forTests="false" />
11
- <orderEntry type="library" scope="PROVIDED" name="bundler (v1.16.2, rbenv: 2.3.1) [gem]" level="application" />
11
+ <orderEntry type="library" scope="PROVIDED" name="bundler (v2.0.1, rbenv: 2.3.1) [gem]" level="application" />
12
12
  <orderEntry type="library" scope="PROVIDED" name="minitest (v5.8.3, rbenv: 2.3.1) [gem]" level="application" />
13
13
  <orderEntry type="library" scope="PROVIDED" name="rake (v10.4.2, rbenv: 2.3.1) [gem]" level="application" />
14
14
  </component>
@@ -4,7 +4,7 @@ $LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
4
4
 
5
5
  Gem::Specification.new do |spec|
6
6
  spec.name = 'fusionauth_client'
7
- spec.version = '1.3.0'
7
+ spec.version = '1.4.0'
8
8
  spec.authors = ['Brian Pontarelli', 'Daniel DeGroff']
9
9
  spec.email = %w(brian@fusionauth.io daniel@fusionauth.io)
10
10
 
@@ -2,7 +2,7 @@ require 'ostruct'
2
2
  require 'fusionauth/rest_client'
3
3
 
4
4
  #
5
- # Copyright (c) 2018, FusionAuth, All Rights Reserved
5
+ # Copyright (c) 2018-2019, FusionAuth, All Rights Reserved
6
6
  #
7
7
  # Licensed under the Apache License, Version 2.0 (the "License");
8
8
  # you may not use this file except in compliance with the License.
@@ -896,7 +896,8 @@ module FusionAuth
896
896
  end
897
897
 
898
898
  #
899
- # Retrieves all of the actions for the user with the given Id.
899
+ # Retrieves all of the actions for the user with the given Id. This will return all time based actions that are active,
900
+ # and inactive as well as non-time based actions.
900
901
  #
901
902
  # @param user_id [string] The Id of the user to fetch the actions for.
902
903
  # @return [FusionAuth::ClientResponse] The ClientResponse object.
@@ -908,6 +909,35 @@ module FusionAuth
908
909
  .go()
909
910
  end
910
911
 
912
+ #
913
+ # Retrieves all of the actions for the user with the given Id that are currently preventing the User from logging in.
914
+ #
915
+ # @param user_id [string] The Id of the user to fetch the actions for.
916
+ # @return [FusionAuth::ClientResponse] The ClientResponse object.
917
+ #
918
+ def retrieve_actions_preventing_login(user_id)
919
+ start.uri('/api/user/action')
920
+ .url_parameter('userId', user_id)
921
+ .url_parameter('preventingLogin', true)
922
+ .get()
923
+ .go()
924
+ end
925
+
926
+ #
927
+ # Retrieves all of the actions for the user with the given Id that are currently active.
928
+ # An active action means one that is time based and has not been canceled, and has not ended.
929
+ #
930
+ # @param user_id [string] The Id of the user to fetch the actions for.
931
+ # @return [FusionAuth::ClientResponse] The ClientResponse object.
932
+ #
933
+ def retrieve_active_actions(user_id)
934
+ start.uri('/api/user/action')
935
+ .url_parameter('userId', user_id)
936
+ .url_parameter('active', true)
937
+ .get()
938
+ .go()
939
+ end
940
+
911
941
  #
912
942
  # Retrieves the application for the given id or all of the applications if the id is null.
913
943
  #
@@ -1172,6 +1202,21 @@ module FusionAuth
1172
1202
  .go()
1173
1203
  end
1174
1204
 
1205
+ #
1206
+ # Retrieves the last number of login records.
1207
+ #
1208
+ # @param offset [Numeric] The initial record. e.g. 0 is the last login, 100 will be the 100th most recent login.
1209
+ # @param limit [Numeric] (Optional, defaults to 10) The number of records to retrieve.
1210
+ # @return [FusionAuth::ClientResponse] The ClientResponse object.
1211
+ #
1212
+ def retrieve_recent_logins(offset, limit)
1213
+ start.uri('/api/user/recent-login')
1214
+ .url_parameter('offset', offset)
1215
+ .url_parameter('limit', limit)
1216
+ .get()
1217
+ .go()
1218
+ end
1219
+
1175
1220
  #
1176
1221
  # Retrieves the refresh tokens that belong to the user with the given Id.
1177
1222
  #
@@ -1408,6 +1453,46 @@ module FusionAuth
1408
1453
  .go()
1409
1454
  end
1410
1455
 
1456
+ #
1457
+ # Retrieves the login report between the two instants for a particular user by Id. If you specify an application id, it will only return the
1458
+ # login counts for that application.
1459
+ #
1460
+ # @param application_id [string] (Optional) The application id.
1461
+ # @param user_id [string] The userId id.
1462
+ # @param start [OpenStruct, Hash] The start instant as UTC milliseconds since Epoch.
1463
+ # @param _end [OpenStruct, Hash] The end instant as UTC milliseconds since Epoch.
1464
+ # @return [FusionAuth::ClientResponse] The ClientResponse object.
1465
+ #
1466
+ def retrieve_user_login_report(application_id, user_id, start, _end)
1467
+ start.uri('/api/report/login')
1468
+ .url_parameter('applicationId', application_id)
1469
+ .url_parameter('userId', user_id)
1470
+ .url_parameter('start', start)
1471
+ .url_parameter('end', _end)
1472
+ .get()
1473
+ .go()
1474
+ end
1475
+
1476
+ #
1477
+ # Retrieves the login report between the two instants for a particular user by login Id. If you specify an application id, it will only return the
1478
+ # login counts for that application.
1479
+ #
1480
+ # @param application_id [string] (Optional) The application id.
1481
+ # @param login_id [string] The userId id.
1482
+ # @param start [OpenStruct, Hash] The start instant as UTC milliseconds since Epoch.
1483
+ # @param _end [OpenStruct, Hash] The end instant as UTC milliseconds since Epoch.
1484
+ # @return [FusionAuth::ClientResponse] The ClientResponse object.
1485
+ #
1486
+ def retrieve_user_login_report_by_login_id(application_id, login_id, start, _end)
1487
+ start.uri('/api/report/login')
1488
+ .url_parameter('applicationId', application_id)
1489
+ .url_parameter('loginId', login_id)
1490
+ .url_parameter('start', start)
1491
+ .url_parameter('end', _end)
1492
+ .get()
1493
+ .go()
1494
+ end
1495
+
1411
1496
  #
1412
1497
  # Retrieves the last number of login records for a user.
1413
1498
  #
@@ -1416,8 +1501,8 @@ module FusionAuth
1416
1501
  # @param limit [Numeric] (Optional, defaults to 10) The number of records to retrieve.
1417
1502
  # @return [FusionAuth::ClientResponse] The ClientResponse object.
1418
1503
  #
1419
- def retrieve_user_login_report(user_id, offset, limit)
1420
- start.uri('/api/report/user-login')
1504
+ def retrieve_user_recent_logins(user_id, offset, limit)
1505
+ start.uri('/api/user/recent-login')
1421
1506
  .url_parameter('userId', user_id)
1422
1507
  .url_parameter('offset', offset)
1423
1508
  .url_parameter('limit', limit)
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: fusionauth_client
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.3.0
4
+ version: 1.4.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Brian Pontarelli
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: exe
11
11
  cert_chain: []
12
- date: 2018-12-06 00:00:00.000000000 Z
12
+ date: 2019-02-04 00:00:00.000000000 Z
13
13
  dependencies: []
14
14
  description: This library contains the Ruby client library that helps you connect
15
15
  your application to FusionAuth.
@@ -51,8 +51,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
51
51
  - !ruby/object:Gem::Version
52
52
  version: '0'
53
53
  requirements: []
54
- rubyforge_project:
55
- rubygems_version: 2.5.1
54
+ rubygems_version: 3.0.2
56
55
  signing_key:
57
56
  specification_version: 4
58
57
  summary: The Ruby client library for FusionAuth