10Duke Java Core
Loading...
Searching...
No Matches
tenduke.sdk.core.service.OkHttpProvider Interface Reference

Detailed Description

Interface for providing configured OkHttpClient instances ready to use.

An instance of this type is required by 10Duke SDK OAuth clients for making HTTP calls. This provider signature may also be utilized by other classes that interact with HTTP APIs.

Public Member Functions

OkHttpClient provide ()
 Provides an OkHttpClient instance.
 

Public Attributes

int MAX_USER_AGENT_LEN = 1024
 Maximum length for user agent values.
 
Pattern VALID_USER_AGENT_REGEX = Pattern.compile("^[A-Za-z0-9\\-\\[\\]/_\\.,\\s]+$")
 A regex pattern that defines the criteria for valid user agent values.
 

Member Function Documentation

◆ provide()

OkHttpClient tenduke.sdk.core.service.OkHttpProvider.provide ( )

Provides an OkHttpClient instance.

Returns
an OkHttpClient instance.

Member Data Documentation

◆ MAX_USER_AGENT_LEN

int tenduke.sdk.core.service.OkHttpProvider.MAX_USER_AGENT_LEN = 1024

Maximum length for user agent values.

NOTE: it is a security measure to validate the length before using a regex matcher to validate the other aspects of validity.


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