Common.PlatformRefreshTokenCredential Class

Namespace: Improbable.SpatialOS.Platform

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



Static Fields

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:


PlatformRefreshTokenCredential(IAuthorizationCodeFlow flow, string userId, TokenResponse token)

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

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


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.

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

Updated about a year ago

Common.PlatformRefreshTokenCredential Class

Suggested Edits are limited on API Reference Pages

You can only suggest edits to Markdown body content, but not to the API spec.