OAuthUtil

object OAuthUtil

OAuth cryptography utilities.

Functions

Link copied to clipboard
fun initialAuthorizationHeaderComponents(    consumerKey: String,     accessToken: String? = null,     callback: String? = null,     nonce: String = randomUUID,     timestamp: String = currentEpochTime): MutableMap<String, String?>

Creates initial authorization header components.

Link copied to clipboard
fun signature(signingKey: String, signatureBaseString: String): String

Creates signature.

Link copied to clipboard
fun signatureParam(    authorizationHeaderComponent: Map<String, String?>,     body: Any,     parameters: ParametersBuilder,     forms: ParametersBuilder): Map<String, String>

Creates signature param.

Link copied to clipboard
fun signatureParamString(param: Map<String, String>): String

Creates signature param string.

Link copied to clipboard
fun signingBaseString(    httpMethod: HttpMethod,     url: Url,     signatureParamString: String): String

Creates signing base string.

Link copied to clipboard
fun signingKey(consumerSecret: String, accessTokenSecret: String? = null): String

Creates signing key.

Properties

Link copied to clipboard
val currentEpochTime: String

Current epoch time string in seconds.

Link copied to clipboard
val randomUUID: String

Generates random uuid string with upper case.