Exemple #1
0
        public async Task <IActionResult> FindAsync([FromRoute] int applicationId)
        {
            Application application;

            if (this.UserHasScope(ApplicationScopes.Admin))
            {
                application = await _findApplicationService.FindAsync(applicationId);
            }
            else
            {
                application = await _findApplicationService.FindAsync(applicationId, this.GetUserId());
            }

            var found = ApplicationResponseDto.FromApplication(application);

            return(Ok(found));
        }
Exemple #2
0
        public async Task <Application> GenerateSecretAsync(int applicationId)
        {
            var application = await _findApplicationService.FindAsync(applicationId);

            return(await GenerateSecretAsync(application));
        }
Exemple #3
0
        public async Task <List <Role> > GetByApplicationId(int applicationId, Guid userId)
        {
            await _findApplicationService.FindAsync(applicationId, userId);

            return(await GetByApplicationId(applicationId));
        }