10Duke Scale SDK for Java
Loading...
Searching...
No Matches
tenduke.scale.client.LicenseCheckoutHttpClient Class Reference

Detailed Description

License checkout API implementation without any caching or persistence features.

In other words, this implementation provides API call wrappers for the license checkout API as direct request - response implementation.

Inheritance diagram for tenduke.scale.client.LicenseCheckoutHttpClient:
tenduke.scale.client.AbstractRestApiClient

Public Member Functions

List< JwtToken > checkoutLicense (final Map< String, String > claims, final List< LicenseCheckoutArguments > consumptionArguments)
 Checkout a license using Open ID Connect API authorization (OIDC, identity based licensing).
 
List< JwtToken > checkoutLicenseByKey (final String licenseKey, final Map< String, String > claims, final List< LicenseCheckoutArguments > consumptionArguments)
 Checkout a license using a license key.
 
List< JwtToken > startMeteredUseOfLicense (final Map< String, String > claims, final List< LicenseCheckoutArguments > consumptionArguments)
 Starts metered use of a license using Open ID Connect API authorization (OIDC, identity based licensing).
 
List< JwtToken > startMeteredUseByLicenseKey (final String licenseKey, final Map< String, String > claims, final List< LicenseCheckoutArguments > consumptionArguments)
 Starts metered use of a license using a license key.
 
List< JwtToken > heartbeatLicense (final Map< String, String > claims, final List< LicenseHeartbeatArguments > heartbeatArguments)
 
List< JwtToken > heartbeatMeteredLicense (final Map< String, String > claims, final List< LicenseHeartbeatArguments > heartbeatArguments)
 
List< JwtToken > heartbeatLicense (final Map< String, String > claims, final String licenseKey, final List< LicenseHeartbeatArguments > heartbeatArguments)
 
List< JwtToken > heartbeatMeteredLicense (final Map< String, String > claims, final String licenseKey, final List< LicenseHeartbeatArguments > heartbeatArguments)
 
List< LicenseReleaseResultreleaseLicense (final Map< String, String > claims, final List< LicenseReleaseArguments > releaseArguments)
 
List< LicenseReleaseResultreleaseLicense (final Map< String, String > claims, final String licenseKey, final List< LicenseReleaseArguments > releaseArguments)
 
List< LicenseReleaseResultendMeteredLicenseUse (final Map< String, String > claims, final List< LicenseReleaseArguments > releaseArguments)
 
List< LicenseReleaseResultendMeteredLicenseUse (final Map< String, String > claims, final String licenseKey, final List< LicenseReleaseArguments > releaseArguments)
 
FeatureFlagsResponse describeLicensesAsFeatureFlags (final UUID licenseeId, final UUID licenseConsumerId, final String filterValue)
 Analyzes licenses that a license consumer has access to and describes those licenses as feature flags.
 
String describeLicensesAsFeatureFlagsJwt (final UUID licenseeId, final UUID licenseConsumerId, final String filterValue)
 Analyzes licenses that a license consumer has access to and describes those licenses as feature flags.
 
LicenseConsumerLicensesStatus describeLicenseConsumerLicenses (final UUID licenseeId, final UUID licenseConsumerId, final String filterField, final String filterValue, final boolean withMetadata, final int offset, final int maxCount, final String orderBy, final boolean asc)
 Analyzes licenses that a license consumer has access to and describes license status to determine likely outcome if trying to use licenses.
 
LicenseKeyLicensesStatus describeLicenseKeyLicenses (final String licenseKey, final boolean withMetadata)
 Analyzes the license(s) that a license key entitles access to and describes the license status to determine the likely outcome if trying to use the license(s).
 
List< LicenseedescribeLicenseConsumerLicensees (final UUID licenseConsumerId, final int offset, final int maxCount, final String orderBy, final boolean asc)
 Analyzes what licensees a license consumer is associated to.
 
LicenseConsumerClientBindingStatus describeLicenseConsumerClientBindings (final UUID licenseeId, final UUID licenseConsumerId, final String filterField, final String filterValue, final boolean withMetadata, final int offset, final int maxCount, final String orderBy, final boolean asc)
 Analyzes licenses that a license consumer is known to have a checkout for currently.
 
LicenseConsumerClientBindingStatus describeLicenseClientBindings (final UUID licenseeId, final UUID licenseId, final UUID licenseConsumerId, final String filterField, final String filterValue, final boolean withMetadata, final int offset, final int maxCount, final String orderBy, final boolean asc)
 Finds a specific license consumption client binding.
 
LicenseConsumerClientBindingStatus findLicenseClientBinding (final UUID licenseeId, final long clientBindingId, final boolean withMetadata)
 Finds a specific license consumption client binding.
 
AuthorizationProvider switchAuthzJwtProviders (final AuthorizationProvider toProvider)
 Changes the current authorization header JWT provider to a new one.
 

Protected Member Functions

List< String > checkoutLicenseNoParse (final Map< String, String > claims, final List< LicenseCheckoutArguments > consumptionArguments)
 
List< String > checkoutLicenseByKeyNoParse (final String licenseKey, final Map< String, String > claims, final List< LicenseCheckoutArguments > consumptionArguments)
 
List< String > startMeteredUseOfLicenseNoParse (final Map< String, String > claims, final List< LicenseCheckoutArguments > consumptionArguments)
 
List< String > startMeteredUseByLicenseKeyNoParse (final String licenseKey, final Map< String, String > claims, final List< LicenseCheckoutArguments > consumptionArguments)
 
List< String > heartbeatLicenseNoParse (final Map< String, String > claims, final List< LicenseHeartbeatArguments > consumptionArguments)
 
List< String > heartbeatMeteredLicenseNoParse (final Map< String, String > claims, final List< LicenseHeartbeatArguments > consumptionArguments)
 
List< String > heartbeatLicenseNoParse (final Map< String, String > claims, final String licenseKey, final List< LicenseHeartbeatArguments > consumptionArguments)
 
List< String > heartbeatMeteredLicenseNoParse (final Map< String, String > claims, final String licenseKey, final List< LicenseHeartbeatArguments > consumptionArguments)
 
List< JwtToken > parseJwtArrayResponse (final List< String > jwtStringArray)
 Parses a list of Strings as a List of JWT's.
 
JwtToken parseJwtString (final String jwtString)
 Parses a String as a JWT.
 
Map< String, String > buildRequestHeaders (final Map< String, String > initialHeaders, final RequestHeadersSettings settings)
 Builds general header(s) to include in an API HTTP request, including authorization related header(s).
 
void buildAuthorizationHeader (final Map< String, String > headers, final RequestHeadersSettings settings)
 Builds authorization related header(s) to include in an API HTTP request.
 
- Protected Member Functions inherited from tenduke.scale.client.AbstractRestApiClient
 AbstractRestApiClient (final AuthorizationProvider authzBearerProvider, final TendukeScaleConfig config)
 Initializes a new instance of this class with a null tenduke.sdk.core.service.JwtSignatureVerifierKeyProvider and a new OkHttpClient with internal default configuration options (15 sec.
 
 AbstractRestApiClient (final AuthorizationProvider authzBearerProvider, final TendukeScaleConfig config, final OkHttpClient okHttpClient)
 Initializes a new instance of this class.
 
void logErrorResponse (final Response response, final String entityType, final String action, final Logger logger) throws IOException
 Logs an error response.
 
void logErrorResponse (final ApiException apiException, final String entityType, final String action, final Logger logger)
 Logs an error response.
 
String extractBaseUrl ()
 Validates and extracts the 10Duke Scale base URL from previously provided TendukeScaleConfig.
 

Package Functions

 LicenseCheckoutHttpClient (final AuthorizationProvider authzBearerProvider, final JwtServiceProvider jwtServiceProvider, final TendukeScaleConfig config, final OkHttpClient okHttpClient, final ObjectMapper mapper)
 Initializes a new instance of this class.
 
private< R > R executeOrApiException (final RestApiCallExecArgs< R > callArgs)
 Makes a REST API call according to the call arguments object.
 
private< T > T validateResponseReturnApiObject (final okhttp3.Response rsp, final JavaType apiObjectClass, final String apiObjectType, final String apiOperation, final String apiExceptionMessageTemplate) throws IOException
 Validates the response status to match success.
 

Constructor & Destructor Documentation

◆ LicenseCheckoutHttpClient()

tenduke.scale.client.LicenseCheckoutHttpClient.LicenseCheckoutHttpClient ( final AuthorizationProvider authzBearerProvider,
final JwtServiceProvider jwtServiceProvider,
final TendukeScaleConfig config,
final OkHttpClient okHttpClient,
final ObjectMapper mapper )
package

Initializes a new instance of this class.

Parameters
authzBearerProviderAuthorizationProvider is called when a new value for HTTP Authorization header is needed. May be null if only license key based API interaction is used.
jwtServiceProviderService provider used when handling JWT parsing and verification.
configThe configuration to use for the 10Duke Scale base URL and settings for HTTP client.
okHttpClientAn instance of OkHttpClient to use for making HTTP requests. If a null value is provided then a new OkHttpClient with internal default configuration options (15 sec. timeout for connect, call, read and write).
mapperA Jackson ObjectMapper that is used to serialize objects into a request body and to deserialize objects from response payload.

Member Function Documentation

◆ buildAuthorizationHeader()

void tenduke.scale.client.LicenseCheckoutHttpClient.buildAuthorizationHeader ( final Map< String, String > headers,
final RequestHeadersSettings settings )
protected

Builds authorization related header(s) to include in an API HTTP request.

Parameters
headersMap with all headers, the authorization header(s) will be added into this map.
settingsAuthorization header options.

◆ buildRequestHeaders()

Map< String, String > tenduke.scale.client.LicenseCheckoutHttpClient.buildRequestHeaders ( final Map< String, String > initialHeaders,
final RequestHeadersSettings settings )
protected

Builds general header(s) to include in an API HTTP request, including authorization related header(s).

Parameters
initialHeadersMap with headers that have been predefined, The contents of this map will be added to the return value including the authorization header(s) built as part of this method.
settingsAuthorization header options.
Returns
A map with headers to include in the API call.

◆ checkoutLicense()

List< JwtToken > tenduke.scale.client.LicenseCheckoutHttpClient.checkoutLicense ( final Map< String, String > claims,
final List< LicenseCheckoutArguments > consumptionArguments )

Checkout a license using Open ID Connect API authorization (OIDC, identity based licensing).

Parameters
claimsClient application claims like hardware id, etc. Use model class ClientClaims as utility to assemble the claims.
consumptionArgumentsList of argument objects specific for each license to checkout. The list must contain at least 1 consumption argument.
Returns
License checkout result JWT's. Note: checkout failure is also communicated as a JWT.

◆ checkoutLicenseByKey()

List< JwtToken > tenduke.scale.client.LicenseCheckoutHttpClient.checkoutLicenseByKey ( final String licenseKey,
final Map< String, String > claims,
final List< LicenseCheckoutArguments > consumptionArguments )

Checkout a license using a license key.

Parameters
licenseKeyThe license key, must not be blank.
claimsClient application claims like hardware id, etc. Use model class ClientClaims as utility to assemble the claims.
consumptionArgumentsList of argument objects specific for each license to checkout. The list must contain at least 1 consumption argument.
Returns
License checkout result JWT's. Note: checkout failure is also communicated as a JWT.

◆ checkoutLicenseByKeyNoParse()

List< String > tenduke.scale.client.LicenseCheckoutHttpClient.checkoutLicenseByKeyNoParse ( final String licenseKey,
final Map< String, String > claims,
final List< LicenseCheckoutArguments > consumptionArguments )
protected

◆ checkoutLicenseNoParse()

List< String > tenduke.scale.client.LicenseCheckoutHttpClient.checkoutLicenseNoParse ( final Map< String, String > claims,
final List< LicenseCheckoutArguments > consumptionArguments )
protected

◆ describeLicenseClientBindings()

LicenseConsumerClientBindingStatus tenduke.scale.client.LicenseCheckoutHttpClient.describeLicenseClientBindings ( final UUID licenseeId,
final UUID licenseId,
final UUID licenseConsumerId,
final String filterField,
final String filterValue,
final boolean withMetadata,
final int offset,
final int maxCount,
final String orderBy,
final boolean asc )

Finds a specific license consumption client binding.

Parameters
licenseeIdAn identifier to scope the find within licenses of a specific licensee.
licenseIdThe identifier of the license, which client bindings are requested.
licenseConsumerIdOptional identifier of a license consumer, which client bindings are requested.
filterFieldName of field to apply filter value on. Defaults to null (no filtering). See the API docs for allowed values.
filterValueFilter value to apply on licenses. Defaults to null (no filtering).
withMetadataFlag to control including verbose information about the licenses and client bindings. Setting this option to true will fetch contract, order, subscription and external reference information at time of original license grant, the license container, a possible license key and related product information. For client bindings the additional information is related to license consumption objects and license consumers. Defaults to false.
offsetOffset for paging results.
maxCountLimit for controlling result size.
orderByField name to order results by. Defaults to the LicenseConsumptionClientBinding.validFrom field. See the API docs for allowed values.
ascFlag that controls ordering in ascending vs. descending order. Defaults to false, meaning descending order.
Returns
A LicenseConsumerClientBindingStatus with information about the license consumption client binding. Throws an ApiException if the client binding is not found.

◆ describeLicenseConsumerClientBindings()

LicenseConsumerClientBindingStatus tenduke.scale.client.LicenseCheckoutHttpClient.describeLicenseConsumerClientBindings ( final UUID licenseeId,
final UUID licenseConsumerId,
final String filterField,
final String filterValue,
final boolean withMetadata,
final int offset,
final int maxCount,
final String orderBy,
final boolean asc )

Analyzes licenses that a license consumer is known to have a checkout for currently.

This endpoint can be called using either Scale JWT authorization or by using an OIDC Id Token. When using the Scale JWT authorization option the minimum permission grant definition is: Licensing.action.

Parameters
licenseeIdIdentifier of the licensee that the license belongs to.
licenseConsumerIdIdentifier of the license consumer that the the information is scoped to. NOTE: This parameter is required when using Scale JWT API authorization. Ignore this request parameter when using an OIDC Id Token as the API authorization model.
filterFieldName of field to apply filter value on. Defaults to null (no filtering). See the API docs for allowed values.
filterValueFilter value to apply on licenses. Defaults to null (no filtering).
withMetadataFlag to control including verbose information about the licenses and client bindings. Setting this option to true will fetch contract, order, subscription and external reference information at time of original license grant, the license container, a possible license key and related product information. For client bindings the additional information is related to license consumption objects and license consumers. Defaults to false.
offsetOffset for paging results. Defaults to 0.
maxCountLimit for controlling result size. Defaults to 5.
orderByField name to order results by. Defaults to the LicenseConsumptionClientBinding.validFrom field. See the API docs for allowed values.
ascFlag that controls ordering in ascending vs. descending order. Defaults to false, meaning descending order.
Returns
Information about a license consumer's current license consumption client binding.

◆ describeLicenseConsumerLicensees()

List< Licensee > tenduke.scale.client.LicenseCheckoutHttpClient.describeLicenseConsumerLicensees ( final UUID licenseConsumerId,
final int offset,
final int maxCount,
final String orderBy,
final boolean asc )

Analyzes what licensees a license consumer is associated to.

The association is defined as a relation between a license consumer and one or more license containers that belong to licensees. This API method can be called using either Scale JWT authorization or by using an OIDC Id Token. When using the Scale JWT authorization option the minimum permission grant definition is: Licensing.action.

Parameters
licenseConsumerIdIdentifier of the license consumer who's licensee associations are returned. NOTE: This parameter is required when using Scale JWT API authorization. Ignore this request parameter when using an OIDC Id Token as the API authorization model.
offsetOffset for paging results. Defaults to 0.
maxCountLimit for controlling result size. Defaults to 5.
orderByField name to order results by. Defaults to the Licensee.naturalId field. See the API docs for allowed values.
ascFlag that controls ordering in ascending vs. descending order. Defaults to false, meaning descending order.
Returns
A list of licensees who's licenses the license consumer is entitled to use.

◆ describeLicenseConsumerLicenses()

LicenseConsumerLicensesStatus tenduke.scale.client.LicenseCheckoutHttpClient.describeLicenseConsumerLicenses ( final UUID licenseeId,
final UUID licenseConsumerId,
final String filterField,
final String filterValue,
final boolean withMetadata,
final int offset,
final int maxCount,
final String orderBy,
final boolean asc )

Analyzes licenses that a license consumer has access to and describes license status to determine likely outcome if trying to use licenses.

This API method can be called using either Scale JWT authorization or by using an OIDC Id Token. When using the Scale JWT authorization option the minimum permission grant definition is: Licensing.action. Paging detail: the offset and limit values apply to license data. The maximum number or client binding information included in the response is 5. Paging all client bindings can be done by using describeLicenseConsumerClientBindings(...) or describeLicenseClientBindings(...) depending on aspect license consumer aspect vs. license aspect. NOTE: paging parameters apply to licenses (the main level of data in the response). In other words, paging does not effect the additional information that is included in the response when parameter withMetadata == true.

Parameters
licenseeIdIdentifier of the licensee that the license belongs to.
licenseConsumerIdIdentifier of the license consumer that the the information is scoped to. NOTE: This parameter is required when using Scale JWT API authorization. Ignore this request parameter when using an OIDC Id Token as the API authorization model.
filterFieldName of field to apply filter value on. Defaults to null (no filtering). See the API docs for allowed values.
filterValueFilter value to apply on licenses. Defaults to null (no filtering).
withMetadataFlag to control including verbose information about the licenses and client bindings. Setting this option to true will fetch contract, order, subscription and external reference information at time of original license grant, the license container, a possible license key and related product information. For client bindings the additional information is related to license consumption objects and license consumers. Defaults to false.
offsetOffset for paging results. Defaults to 0. Applies to licenses, not the additional information included when parameter withMetadata == true.
maxCountLimit for controlling result size. Defaults to 5. Applies to licenses, not the additional information included when parameter withMetadata == true.
orderByField name to order results by. Defaults to the License.validFrom field. See the API docs for allowed values.
ascFlag that controls ordering in ascending vs. descending order. Defaults to false, meaning descending order.
Returns
Information about a licensee's licenses that a license consumer is entitled to use.

◆ describeLicenseKeyLicenses()

LicenseKeyLicensesStatus tenduke.scale.client.LicenseCheckoutHttpClient.describeLicenseKeyLicenses ( final String licenseKey,
final boolean withMetadata )

Analyzes the license(s) that a license key entitles access to and describes the license status to determine the likely outcome if trying to use the license(s).

This endpoint authorizes access based on the validity of the license key.

Parameters
licenseKeyThe license key used to query license information.
withMetadataFlag to control including verbose information about the licenses. Setting this option to true will fetch contract, order, subscription and external reference information at time of original license grant, the license container, a possible license key and related product information. Defaults to false.
Returns
Information about the license(s) that the license key entitles to use.

◆ describeLicensesAsFeatureFlags()

FeatureFlagsResponse tenduke.scale.client.LicenseCheckoutHttpClient.describeLicensesAsFeatureFlags ( final UUID licenseeId,
final UUID licenseConsumerId,
final String filterValue )

Analyzes licenses that a license consumer has access to and describes those licenses as feature flags.

This endpoint can be called using either Scale JWT authorization or by using an OIDC Id Token. When using the Scale JWT authorization option the minimum permission grant definition is: Licensing.action.

Parameters
licenseeIdIdentifier of the licensee that the licenses belongs to.
licenseConsumerIdIdentifier of the license consumer that the the information is scoped to. NOTE: This parameter is required when using Scale JWT API authorization. Ignore this request parameter when using an OIDC Id Token as the API authorization model.
filterValueProduct name to match in result. Defaults to null (no filtering). The match is full name, case insensitive
Returns
A list of feature flags structured with a per product breakdown describing what is enabled for the license consumer.

◆ describeLicensesAsFeatureFlagsJwt()

String tenduke.scale.client.LicenseCheckoutHttpClient.describeLicensesAsFeatureFlagsJwt ( final UUID licenseeId,
final UUID licenseConsumerId,
final String filterValue )

Analyzes licenses that a license consumer has access to and describes those licenses as feature flags.

This endpoint can be called using either Scale JWT authorization or by using an OIDC Id Token. When using the Scale JWT authorization option the minimum permission grant definition is: Licensing.action.

Parameters
licenseeIdIdentifier of the licensee that the licenses belongs to.
licenseConsumerIdIdentifier of the license consumer that the the information is scoped to. NOTE: This parameter is required when using Scale JWT API authorization. Ignore this request parameter when using an OIDC Id Token as the API authorization model.
filterValueProduct name to match in result. Defaults to null (no filtering). The match is full name, case insensitive
Returns
A JWT with information about feature flags enabled for a license consumer.

◆ endMeteredLicenseUse() [1/2]

List< LicenseReleaseResult > tenduke.scale.client.LicenseCheckoutHttpClient.endMeteredLicenseUse ( final Map< String, String > claims,
final List< LicenseReleaseArguments > releaseArguments )

◆ endMeteredLicenseUse() [2/2]

List< LicenseReleaseResult > tenduke.scale.client.LicenseCheckoutHttpClient.endMeteredLicenseUse ( final Map< String, String > claims,
final String licenseKey,
final List< LicenseReleaseArguments > releaseArguments )

◆ executeOrApiException()

private< R > R tenduke.scale.client.LicenseCheckoutHttpClient.executeOrApiException ( final RestApiCallExecArgs< R > callArgs)
package

Makes a REST API call according to the call arguments object.

Parameters
<R>Type of return value from the call.
callArgsThe specification of the call to make.
Returns
The result parsed from response or throws an ApiException.

◆ findLicenseClientBinding()

LicenseConsumerClientBindingStatus tenduke.scale.client.LicenseCheckoutHttpClient.findLicenseClientBinding ( final UUID licenseeId,
final long clientBindingId,
final boolean withMetadata )

Finds a specific license consumption client binding.

Parameters
licenseeIdThe identifier to scope the find within licenses of a specific licensee.
clientBindingIdIdentifier of the license consumption client binding to find.
withMetadataFlag to control if additional metadata is included in the response. A false value will yield better performance.
Returns
A LicenseConsumerClientBindingStatus with information about the license consumption client binding. Throws an ApiException if the client binding is not found.

◆ heartbeatLicense() [1/2]

List< JwtToken > tenduke.scale.client.LicenseCheckoutHttpClient.heartbeatLicense ( final Map< String, String > claims,
final List< LicenseHeartbeatArguments > heartbeatArguments )

◆ heartbeatLicense() [2/2]

List< JwtToken > tenduke.scale.client.LicenseCheckoutHttpClient.heartbeatLicense ( final Map< String, String > claims,
final String licenseKey,
final List< LicenseHeartbeatArguments > heartbeatArguments )

◆ heartbeatLicenseNoParse() [1/2]

List< String > tenduke.scale.client.LicenseCheckoutHttpClient.heartbeatLicenseNoParse ( final Map< String, String > claims,
final List< LicenseHeartbeatArguments > consumptionArguments )
protected

◆ heartbeatLicenseNoParse() [2/2]

List< String > tenduke.scale.client.LicenseCheckoutHttpClient.heartbeatLicenseNoParse ( final Map< String, String > claims,
final String licenseKey,
final List< LicenseHeartbeatArguments > consumptionArguments )
protected

◆ heartbeatMeteredLicense() [1/2]

List< JwtToken > tenduke.scale.client.LicenseCheckoutHttpClient.heartbeatMeteredLicense ( final Map< String, String > claims,
final List< LicenseHeartbeatArguments > heartbeatArguments )

◆ heartbeatMeteredLicense() [2/2]

List< JwtToken > tenduke.scale.client.LicenseCheckoutHttpClient.heartbeatMeteredLicense ( final Map< String, String > claims,
final String licenseKey,
final List< LicenseHeartbeatArguments > heartbeatArguments )

◆ heartbeatMeteredLicenseNoParse() [1/2]

List< String > tenduke.scale.client.LicenseCheckoutHttpClient.heartbeatMeteredLicenseNoParse ( final Map< String, String > claims,
final List< LicenseHeartbeatArguments > consumptionArguments )
protected

◆ heartbeatMeteredLicenseNoParse() [2/2]

List< String > tenduke.scale.client.LicenseCheckoutHttpClient.heartbeatMeteredLicenseNoParse ( final Map< String, String > claims,
final String licenseKey,
final List< LicenseHeartbeatArguments > consumptionArguments )
protected

◆ parseJwtArrayResponse()

List< JwtToken > tenduke.scale.client.LicenseCheckoutHttpClient.parseJwtArrayResponse ( final List< String > jwtStringArray)
protected

Parses a list of Strings as a List of JWT's.

NOTE: does not perform verification of the JWT's.

Parameters
jwtStringArrayThe list of String to parse.
Returns
List of JWT tokens.

◆ parseJwtString()

JwtToken tenduke.scale.client.LicenseCheckoutHttpClient.parseJwtString ( final String jwtString)
protected

Parses a String as a JWT.

NOTE: does not perform verification of the JWT.

Parameters
jwtStringThe String to parse as a JWT.
Returns
The JWT token or null if the input is null.

◆ releaseLicense() [1/2]

List< LicenseReleaseResult > tenduke.scale.client.LicenseCheckoutHttpClient.releaseLicense ( final Map< String, String > claims,
final List< LicenseReleaseArguments > releaseArguments )

◆ releaseLicense() [2/2]

List< LicenseReleaseResult > tenduke.scale.client.LicenseCheckoutHttpClient.releaseLicense ( final Map< String, String > claims,
final String licenseKey,
final List< LicenseReleaseArguments > releaseArguments )

◆ startMeteredUseByLicenseKey()

List< JwtToken > tenduke.scale.client.LicenseCheckoutHttpClient.startMeteredUseByLicenseKey ( final String licenseKey,
final Map< String, String > claims,
final List< LicenseCheckoutArguments > consumptionArguments )

Starts metered use of a license using a license key.

Parameters
licenseKeyThe license key, must not be blank.
claimsClient application claims like hardware id, etc. Use model class ClientClaims as utility to assemble the claims.
consumptionArgumentsList of argument objects specific for each license to checkout. The list must contain at least 1 consumption argument.
Returns
License checkout result JWT's. Note: checkout failure is also communicated as a JWT.

◆ startMeteredUseByLicenseKeyNoParse()

List< String > tenduke.scale.client.LicenseCheckoutHttpClient.startMeteredUseByLicenseKeyNoParse ( final String licenseKey,
final Map< String, String > claims,
final List< LicenseCheckoutArguments > consumptionArguments )
protected

◆ startMeteredUseOfLicense()

List< JwtToken > tenduke.scale.client.LicenseCheckoutHttpClient.startMeteredUseOfLicense ( final Map< String, String > claims,
final List< LicenseCheckoutArguments > consumptionArguments )

Starts metered use of a license using Open ID Connect API authorization (OIDC, identity based licensing).

Parameters
claimsClient application claims like hardware id, etc. Use model class ClientClaims as utility to assemble the claims.
consumptionArgumentsList of argument objects specific for each license to checkout. The list must contain at least 1 consumption argument.
Returns
License checkout result JWT's. Note: checkout failure is also communicated as a JWT.

◆ startMeteredUseOfLicenseNoParse()

List< String > tenduke.scale.client.LicenseCheckoutHttpClient.startMeteredUseOfLicenseNoParse ( final Map< String, String > claims,
final List< LicenseCheckoutArguments > consumptionArguments )
protected

◆ switchAuthzJwtProviders()

AuthorizationProvider tenduke.scale.client.LicenseCheckoutHttpClient.switchAuthzJwtProviders ( final AuthorizationProvider toProvider)

Changes the current authorization header JWT provider to a new one.

Parameters
toProviderNew provider.
Returns
Current provider that was replaced.

◆ validateResponseReturnApiObject()

private< T > T tenduke.scale.client.LicenseCheckoutHttpClient.validateResponseReturnApiObject ( final okhttp3.Response rsp,
final JavaType apiObjectClass,
final String apiObjectType,
final String apiOperation,
final String apiExceptionMessageTemplate ) throws IOException
package

Validates the response status to match success.

If response does not match success a call to log info and to throw an ApiException is made. The API response object(s) are returned for successful responses.

Parameters
<T>Type of response API object.
rspThe API response.
apiObjectClassThe Java type to map the response body to.
apiObjectTypeName of the API object expected as response, used for logging and exception info purpose.
apiOperationName of the operation being called, used for logging and exception info purpose.
apiExceptionMessageTemplateA message that is appended with the HTTP response status code (template + "status: " + response code).
Returns
The response API object(s).
Exceptions
IOExceptionFor IO errors while handling response.

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