docs.unity3d.com
Search Results for

    Show / Hide Table of Contents

    Class ServiceAuthenticationAdminApi

    Represents a collection of functions to interact with the API endpoints

    Inheritance
    object
    ServiceAuthenticationAdminApi
    Implements
    IServiceAuthenticationAdminApi
    IApiAccessor
    Inherited Members
    object.Equals(object)
    object.Equals(object, object)
    object.GetHashCode()
    object.GetType()
    object.MemberwiseClone()
    object.ReferenceEquals(object, object)
    object.ToString()
    Namespace: Unity.Services.Apis.Admin.ServiceAuthentication
    Assembly: Unity.Services.Apis.dll
    Syntax
    public class ServiceAuthenticationAdminApi : IServiceAuthenticationAdminApi, IApiAccessor

    Constructors

    ServiceAuthenticationAdminApi(IApiClient)

    Initializes a new instance of the ServiceAuthenticationAdminApi class using a Configuration object and client instance.

    Declaration
    public ServiceAuthenticationAdminApi(IApiClient apiClient)
    Parameters
    Type Name Description
    IApiClient apiClient

    The client interface for synchronous API access.

    ServiceAuthenticationAdminApi(IApiClient, IApiConfiguration)

    Initializes a new instance of the ServiceAuthenticationAdminApi class using a Configuration object and client instance.

    Declaration
    public ServiceAuthenticationAdminApi(IApiClient apiClient, IApiConfiguration apiConfiguration)
    Parameters
    Type Name Description
    IApiClient apiClient

    The client interface for synchronous API access.

    IApiConfiguration apiConfiguration

    The configuration object.

    Properties

    Client

    The client for accessing this underlying API asynchronously.

    Declaration
    public IApiClient Client { get; }
    Property Value
    Type Description
    IApiClient

    Configuration

    Gets the configuration object

    Declaration
    public IApiConfiguration Configuration { get; }
    Property Value
    Type Description
    IApiConfiguration

    An instance of the Configuration

    Methods

    ExchangeToStateless(string, string, ExchangeRequest, CancellationToken)

    Token Exchange API Exchange a Service Account Key ID and Secret Key pair to a Stateless Access Token. The access token is always scoped to a project and optionally even to an environment. Following the principle of least privilege it is a good practice to scope the token to both project and environment ID if applicable. <br/><br/> The request can optionally contain a list of permissions that should be scoped to the access token. If left out then all scopes will be included by default. <br/><br/> The returned access token is a standard RFC 7519 JWT and has a 1 hour expiration time (TTL). <br /><br /> The Token Exchange API has a maximum limit of 100 permissions that can be included in the Stateless Access Token. Because all permissions are included by default this cap can be hit when no scopes are being specified in the request. This might happen if the Service Account has been assigned multiple roles that each grant their own permissions. If the permission cap is reached the API will return an error. In this case it's required to specify the exact permissions that the Stateless Access Token should have when using the exchange API.

    Declaration
    public ApiOperation<ExchangeResponse> ExchangeToStateless(string projectId, string environmentId = null, ExchangeRequest exchangeRequest = null, CancellationToken cancellationToken = default)
    Parameters
    Type Name Description
    string projectId

    ID for Unity project that the access token is scoped to.

    string environmentId

    Id of an environment that the access token is scoped to. (optional)

    ExchangeRequest exchangeRequest

    (optional)

    CancellationToken cancellationToken

    Cancellation Token to cancel the request.

    Returns
    Type Description
    ApiOperation<ExchangeResponse>

    The operation

    GetBasePath()

    Gets the base path of the API client.

    Declaration
    public string GetBasePath()
    Returns
    Type Description
    string

    The base path

    Implements

    IServiceAuthenticationAdminApi
    IApiAccessor
    In This Article
    Back to top
    Copyright © 2024 Unity Technologies — Trademarks and terms of use
    • Legal
    • Privacy Policy
    • Cookie Policy
    • Do Not Sell or Share My Personal Information
    • Your Privacy Choices (Cookie Settings)