예제 #1
0
        private GenerateTokenRequest BuildTokenRequestParameters(Dataset dataset)
        {
            var parameters = new GenerateTokenRequest(
                accessLevel: "View",
                datasetId: dataset.Id
                );

            if (dataset.IsEffectiveIdentityRequired.HasValue && dataset.IsEffectiveIdentityRequired.Value)
            {
                var userIdentity = _identityProvider.GetUserIdentityWithDatasetId(dataset.Id);
                parameters.Identities = new List <EffectiveIdentity>
                {
                    userIdentity
                };
            }

            return(parameters);
        }