OAuthRequest object

The OAuthRequest object can use the access token to obtain each property of the HTTP request of the protected resource, including the server address, the request header, the security protocol, the timeout value etc.

Note

This object cannot be referenced in the .NET Assembly component, otherwise the component will fail to be deployed.

Properties

OAuthRequest property

Datatype

Description

AnonymousAccess

Boolean

Whether to allow the client to access the server anonymously.

CheckForServerCertRevocation

Boolean

Checks if the server certificate is revoked.

ClassDefinition

PowerObject

An object of type PowerObject containing information about the class definition of the object or control.

EnableHttp2

Boolean

Whether to enable support for the HTTP2 connection when sending requests.

IgnoreServerCertificate

Integer

Ignores certain error(s) of the server certificate.

Method

String

HTTP method for sending authentication requests. Values are:

GET – HTTP get method;

POST – HTTP post method.

SecureProtocol

Integer

Specifies the security protocol.

Timeout

Long

Specifies the timeout seconds. The default value is 60 and 0 indicates no timeout.

URL

String

Specifies the request URL.


Functions

OAuthRequest function

Datatype returned

Description

ClassName

String

Returns the name assigned to the object.

ClearClientCert

Integer

Clears the client certificate that is set with SetClientCert.

ClearHeaders

Integer

Clears the headers of the request.

GetBody

Integer

Gets the body into string.

GetContextService

Integer

Creates a reference to a context-specific instance of the specified service.

GetHeader

String

Gets the request header by name.

GetHeaders

String

Gets the header of all of the requests.

GetParent

PowerObject

Returns a reference to the name of the parent object.

SetAccessToken

Integer

Sets the access token.

SetBody

Integer

Sets the request body.

SetClientCert

Integer

Sets the client certificate that will be used to access the server.

SetHeader

Integer

Sets the request header.

SetHeaders

Integer

Sets the header information of all of the requests.

TypeOf

Object

Returns the type of the object.