vncore / com.venuenext.vncore.http / OAuth

OAuth

class OAuth

OAuth VenueNext

Created on 1/29/19. Copyright © 2019 VenueNext Inc. All rights reserved.

Types

NameValuePair

Name and value pair interface.

interface NameValuePair

ParameterPair

Parameter Pair class that implements to NameValuePair interface.

class ParameterPair : NameValuePair, Comparable<ParameterPair>

ParameterPairs

Parameter Pairs class.

class ParameterPairs : ArrayList<ParameterPair>

Constructors

<init>

Default empty constructor.

OAuth()

Constructor

OAuth(clientKey: String, clientSecret: String)
OAuth(clientKey: String, clientSecret: String, token: String, tokenSecret: String)
OAuth(provider: OAuth, token: String, tokenSecret: String)

Properties

clientKey

var clientKey: String?

clientSecret

var clientSecret: String?

method

val method: String

token

var token: String?

tokenSecret

var tokenSecret: String?

Functions

computeSignature

Computes signature for given string.

fun computeSignature(context: Context, signatureBaseString: String): String

Computes signature for given byte array.

fun computeSignature(context: Context, signatureBaseString: ByteArray): String

getAuthorizationHeader

Gets authorization header.

fun getAuthorizationHeader(context: Context, requestMethod: String, requestUrl: String, bodyhash: String?, params: Map<String, String>?): String

Companion Object Properties

realm

var realm: String

version

var version: String

Companion Object Functions

addUrlParameters

Add URL parameters.

fun addUrlParameters(list: ParameterPairs, url: String?): Unit

computeSHA1

Computes SHA1 encryption.

fun computeSHA1(buffer: ByteArray): String
fun computeSHA1(text: String): String

decodeUrlParameters

Decode URL parameters.

fun decodeUrlParameters(list: ParameterPairs, url: String?): Unit

escape

Escapes and encodes characters in string.

fun escape(value: String): String