lib/fusionauth/fusionauth_client.rb in fusionauth_client-1.24.0 vs lib/fusionauth/fusionauth_client.rb in fusionauth_client-1.25.0
- old
+ new
@@ -1842,20 +1842,34 @@
end
#
# Retrieves the identity provider for the given id or all of the identity providers if the id is null.
#
- # @param identity_provider_id [string] (Optional) The identity provider id.
+ # @param identity_provider_id [string] The identity provider Id.
# @return [FusionAuth::ClientResponse] The ClientResponse object.
def retrieve_identity_provider(identity_provider_id)
start.uri('/api/identity-provider')
.url_segment(identity_provider_id)
.get()
.go()
end
#
+ # Retrieves one or more identity provider for the given type. For types such as Google, Facebook, Twitter and LinkedIn, only a single
+ # identity provider can exist. For types such as OpenID Connect and SAMLv2 more than one identity provider can be configured so this request
+ # may return multiple identity providers.
+ #
+ # @param type [OpenStruct, Hash] The type of the identity provider.
+ # @return [FusionAuth::ClientResponse] The ClientResponse object.
+ def retrieve_identity_provider_by_type(type)
+ start.uri('/api/identity-provider')
+ .url_parameter('type', type)
+ .get()
+ .go()
+ end
+
+ #
# Retrieves all of the identity providers.
#
# @return [FusionAuth::ClientResponse] The ClientResponse object.
def retrieve_identity_providers()
start.uri('/api/identity-provider')
@@ -2113,9 +2127,21 @@
# @return [FusionAuth::ClientResponse] The ClientResponse object.
def retrieve_recent_logins(offset, limit)
start.uri('/api/user/recent-login')
.url_parameter('offset', offset)
.url_parameter('limit', limit)
+ .get()
+ .go()
+ end
+
+ #
+ # Retrieves a single refresh token by unique Id. This is not the same thing as the string value of the refresh token, if you have that, you already have what you need..
+ #
+ # @param user_id [string] The Id of the user.
+ # @return [FusionAuth::ClientResponse] The ClientResponse object.
+ def retrieve_refresh_token_by_id(user_id)
+ start.uri('/api/jwt/refresh')
+ .url_segment(user_id)
.get()
.go()
end
#