Sites

Menu

PlatformRefreshTokenCredential Class

Namespace: Improbable.SpatialOS.Platform.Common

This provides support to automatically acquire access tokens from SpatialOS refresh tokens.

Inheritance

Improbable.SpatialOS.Platform.Common.PlatformCredential


Static Fields

AutoDetected
PlatformRefreshTokenCredential AutoDetected

Gets an instance of the PlatformRefreshTokenCredential class by retrieving the locally stored refresh token from a file. It tries to determine the path to the refresh token in the following order:


Constructors

PlatformRefreshTokenCredential
PlatformRefreshTokenCredential(IAuthorizationCodeFlow flow, string userId, TokenResponse token)

This constructor provides a way to allow more control over the OAuth 2.0 authentication flow.

Parameters
  • IAuthorizationCodeFlow flow : The OAuth authorization flow.
  • string userId : The user ID string.
  • TokenResponse token : The OAuth token.


Methods

PlatformRefreshTokenCredential????????
PlatformRefreshTokenCredential????????(string refreshToken, string authServerUrl = null, string tokenServerUrl = null, IEnumerable<string> scopes = null, ClientSecrets clientSecrets = null)

Initializes a new instance of the PlatformRefreshTokenCredential class that uses the supplied refresh token to authenticate with Improbable's OAuth servers.

Parameters
  • string refreshToken : The SpatialOS refresh token.
  • string authServerUrl : The URL of the OAuth auth server. Defaults to Improbable's production OAuth auth server.
  • string tokenServerUrl : The URL of the OAuth token server. Defaults to Improbable's production OAuth token server.
  • IEnumerable<string> scopes : The scope to request for the OAuth server. Defaults to "[*]:*".
  • ClientSecrets clientSecrets : The client secrets for the SpatialOS refresh token.

Search results

Was this page helpful?

Thanks for letting us know!

Thanks for your feedback

Need more help? Ask on the forums