9.6.8 RefreshToken

The RefreshToken Method is used to request an AccessToken from an AuthorizationService using a cached RefreshToken.

The CurrentRefreshToken shall only be accepted if the ClientCertificate used to create the SecureChannel is the same as the ClientCertificate used when the FinishRequestToken Method returned the original RefeshToken.

This Method shall be called from an encrypted SecureChannel and from a Client that has access to the AccessTokenRequestor Privilege (see 9.2).

Signature

RefreshToken ( 
	[in]  String ResourceId
	[in]  String CurrentRefreshToken
	[out] String AccessToken
	[out] DateTime AccessTokenExpiryTime
	[out] String NewRefreshToken
	[out] DateTime NewRefreshTokenExpiryTime
	
);
Argument Description
ResourceId

The identifier for the Resource that the AccessToken is used to access.

This is usually the ApplicationUri for a Server.

CurrentRefreshTokenThe RefreshToken previously returned by the AuthorizationService.
AccessTokenThe AccessToken granted to the application.
AccessTokenExpiryTimeWhen the AccessToken expires. If the ExpiryTime is not known the AuthorizationServer shall provide a suitable non-null value.
NewRefreshToken

A token that can be cached and used to request a new AccessToken.

It replaces the RefreshToken that was provided in the Request.

If null or empty the current RefreshToken can be used again.

NewRefreshTokenExpiryTimeWhen the RefreshToken expires. If the ExpiryTime is not known the AuthorizationServer shall provide a suitable non-null value.

Method Result Codes (defined in Call Service)

Result Code Description
Bad_IdentityTokenRejectedThe RefreshToken was rejected.
Bad_NotFoundThe ResourceId is not known to the Server.
Bad_UserAccessDeniedThe current user does not have the rights required.
Bad_SecurityModeInsufficientThe SecureChannel is not encrypted.

Table 148 specifies the AddressSpace representation for the RequestAccessToken Method.

Table 152 – RefreshToken Method AddressSpace Definition
Attribute Value
BrowseName2:RefreshToken
References NodeClass BrowseName DataType TypeDefinition ModellingRule
0:HasPropertyVariable0:InputArguments0:Argument[] 0:PropertyTypeMandatory
0:HasPropertyVariable0:OutputArguments0:Argument[] 0:PropertyTypeMandatory