TokenRequest object

The TokenRequest object can get or set the properties for the access token request, including the address of the authorization server, the OAuth 2.0 authorization process, the scope of the access request, 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

TokenRequest 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.

ClientId

String

Identifier of the registered client issued by the authorization server. If the program sets the "Authorization" request header, this property will be ignored.

ClientSecret

String

Password of the registered client issued by the authorization server. If the program sets the "Authorization" request header, this property will be ignored.

EnableHttp2

Boolean

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

GrantType

String

The type of the authorization process. Values are:

  • password – Resource Owner Password Credentials Grant;

  • client_credentials – Client Credentials Grant;

  • placeholder string – Extension Grant.

IgnoreServerCertificate

Integer

Ignores certain error(s) of the server certificate.

Method

String

HTTP method for sending the authentication request. Values are:

GET – HTTP get method;

POST – HTTP post method.

Password

String

The password of the resource owner.

Scope

String

The scope of the access request.

SecureProtocol

Integer

Specifies the security protocol.

Timeout

Long

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

TokenLocation

String

The URL of the authorization server.

UserName

String

The name of the resource owner.


Functions

TokenRequest function

Datatype returned

Description

AppendParam

Integer

Appends the parameter to the request for Extension Grant only.

ClassName

String

Returns the name assigned to the object.

ClearClientCert

Integer

Clears the client certificate that is set with SetClientCert.

ClearHeaders

Integer

Clears the header of the request.

ClearParams

Integer

Clears all of the parameters appended by the AppendParam function.

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.

SetClientCert

Integer

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

SetHeader

Integer

Sets the request header by name.

SetHeaders

Integer

Sets the header information of all of the requests.

TypeOf

Object

Returns the type of the object.