LicenseSpring .Net SDK 7.40.0
Easily add Software Licensing to your application
Loading...
Searching...
No Matches
LicenseSpring.IFloatingClient Interface Reference

FloatingClient interface. More...

Inheritance diagram for LicenseSpring.IFloatingClient:
LicenseSpring.FloatingClient

Public Member Functions

void AuthenticateUser (string username, string password)
 Authenticates the current Floating Server V2 user and caches the JWT token. WARNING: Works only on Floating server V2, and throws exceptions otherwise.
 
void ClearLocalStorage ()
 See BaseManager.ClearLocalStorage.
 
ILicense CurrentLicense ()
 See BaseManager.CurrentLicense.
 
List< LicenseIDGetAllLicenses ()
 Fetches all available licenses from the Floating server.
 
ILicense GetLicenseInfo (LicenseID licenseID=null)
 Get license information for configured product.
 
IFloatingServerInfo GetServerInfo ()
 Get Floating Server information (settings)
 
void Initialize (Configuration configuration, ILicenseStorage storage=null)
 See BaseManager.Initialize.
 
bool IsInitialized ()
 See BaseManager.IsInitialized.
 
bool IsOnline (bool throwExceptions=false)
 Helper method, it checks connection to the Floating server.
 
string LicenseFilePath ()
 See BaseManager.LicenseFilePath.
 
ILicense Register (string id, LicenseID licenseID=null)
 Register client with given id.
 
ILicense ReloadLicense ()
 See BaseManager.ReloadLicense.
 
bool Unregister (string id, LicenseID licenseID=null)
 Unregister client with given id.
 

Properties

string DataLocation [get, set]
 See BaseManager.DataLocation.
 
string LicenseFileName [get, set]
 See BaseManager.LicenseFileName.
 

Detailed Description

FloatingClient interface.

Member Function Documentation

◆ AuthenticateUser()

void LicenseSpring.IFloatingClient.AuthenticateUser ( string  username,
string  password 
)

Authenticates the current Floating Server V2 user and caches the JWT token. WARNING: Works only on Floating server V2, and throws exceptions otherwise.

Parameters
usernameUsername of the user who needs to authenticate to Floating Server V2
passwordPassword of the user who needs to authenticate to Floating Server V2
Exceptions
LicenseSpring.NetworkExceptionIn case of network errors or server not available.
LicenseSpring.LicenseServerExceptionIn case of internal server error.
LicenseSpring.UnknownLicenseSpringExceptionIn rare case if something went wrong, please contact.
System.Security.Authentication.InvalidCredentialExceptionIn case of wrong credential

Implemented in LicenseSpring.FloatingClient.

◆ GetAllLicenses()

List< LicenseID > LicenseSpring.IFloatingClient.GetAllLicenses ( )

Fetches all available licenses from the Floating server.

Warning: Works only on FLoating server v2, throws exception otherwise.

Returns
A list of LicenseID objects of all licenses activated on the Floating server, with the current product code.
Exceptions
LicenseSpring.NetworkExceptionIn case of network errors or server not available.
LicenseSpring.LicenseServerExceptionIn case of internal Floating server error.
LicenseSpring.LicenseSpringExceptionIf trying to fetch licenses on Floating server v1.
System.Security.Authentication.InvalidCredentialExceptionIn case of wrong credential
LicenseSpring.UnknownLicenseSpringExceptionIn rare case if something went wrong.

Implemented in LicenseSpring.FloatingClient.

◆ GetLicenseInfo()

ILicense LicenseSpring.IFloatingClient.GetLicenseInfo ( LicenseID  licenseID = null)

Get license information for configured product.

See https://docs.licensespring.com/docs/apiv4floatinglicense

Parameters
licenseIDLicense id, optional, if not specified gets default configured license for the product.
Returns
License object
Exceptions
System.InvalidOperationExceptionThrown when FloatingClient is not initialized
LicenseSpring.ProductNotFoundExceptionIn case product was not found on floating server
LicenseSpring.LicenseNotFoundExceptionIn case license was not found for configured product
LicenseSpring.LicenseServerExceptionIn case of internal Floating server error.
LicenseSpring.NetworkExceptionIn case of network errors or server not available.
LicenseSpring.UnknownLicenseSpringExceptionIf something went wrong or you use newer version of FloatingServer.

Implemented in LicenseSpring.FloatingClient.

◆ GetServerInfo()

IFloatingServerInfo LicenseSpring.IFloatingClient.GetServerInfo ( )

Get Floating Server information (settings)

The function is obsolete

Returns
FloatingServerInfo object
Exceptions
System.InvalidOperationExceptionThrown when FloatingClient is not initialized
LicenseSpring.LicenseServerExceptionIn case of internal Floating server error
LicenseSpring.NetworkExceptionIn case of network errors

Implemented in LicenseSpring.FloatingClient.

◆ Initialize()

void LicenseSpring.IFloatingClient.Initialize ( Configuration  configuration,
ILicenseStorage  storage = null 
)

See BaseManager.Initialize.

Implemented in LicenseSpring.FloatingClient.

◆ IsOnline()

bool LicenseSpring.IFloatingClient.IsOnline ( bool  throwExceptions = false)

Helper method, it checks connection to the Floating server.

Parameters
throwExceptionsBoolean value indicating whether this method should throw exceptions, by default it's false.
Returns
True if SDK is able to connect to the Floating server and false otherwise.
Exceptions
System.InvalidOperationExceptionThrown when FloatingClient is not initialized
LicenseSpring.NetworkExceptionIn case of network errors or server not available.

Implemented in LicenseSpring.FloatingClient.

◆ Register()

ILicense LicenseSpring.IFloatingClient.Register ( string  id,
LicenseID  licenseID = null 
)

Register client with given id.

Parameters
idUser or instance id for license registration, it can be anything - email, host or domain name, handle, etc.
licenseIDLicense identifier, optional, if not specified this method tries to register to default license for the product.
Returns
License object if registration succeeded, throws exceptions in case of errors
Exceptions
System.InvalidOperationExceptionThrown when FloatingClient is not initialized
LicenseSpring.MaxFloatingReachedExceptionIn case there are no floating slots available
LicenseSpring.ProductNotFoundExceptionIn case product was not found on floating server
LicenseSpring.LicenseNotFoundExceptionIn case license was not found for configured product
LicenseSpring.LicenseActivationExceptionIn server returned empty response
LicenseSpring.LicenseServerExceptionIn case of internal Floating server error
LicenseSpring.NetworkExceptionIn case of network errors, e.g. no network connection or operation timed out.
System.Security.Authentication.InvalidCredentialExceptionIn case of wrong credential
LicenseSpring.UnknownLicenseSpringExceptionIf something went wrong or you use newer version of FloatingServer

Implemented in LicenseSpring.FloatingClient.

◆ Unregister()

bool LicenseSpring.IFloatingClient.Unregister ( string  id,
LicenseID  licenseID = null 
)

Unregister client with given id.

Parameters
idUser or instance id for license registration, it can be anything - email, host or domain name, handle, etc.
licenseIDLicense id, optional, if not specified this method unegister from default configured license for the product.
Returns
True if unregistered successfully
Exceptions
System.InvalidOperationExceptionThrown when FloatingClient is not initialized
LicenseSpring.LicenseServerExceptionIn case of internal Floating server error
System.Security.Authentication.InvalidCredentialExceptionIn case of wrong credential
LicenseSpring.NetworkExceptionIn case of network errors, e.g. no network connection or operation timed out.
System.Security.Authentication.InvalidCredentialExceptionIn case of wrong credential
LicenseSpring.UnknownLicenseSpringExceptionIn rare case if something went wrong.

Implemented in LicenseSpring.FloatingClient.


The documentation for this interface was generated from the following file: