コード例 #1
0
ファイル: Jobs.svc.cs プロジェクト: t4rn/Wucefus
        public ResponseDto AddConsent(ConsentDto consent)
        {
            ResponseDto response = new ResponseDto();

            response.Message = $"You've added a Consent with Value: '{consent?.Value}' and Desc: '{consent.Description}'!";
            response.IsOk    = true;

            return(response);
        }
コード例 #2
0
    /// <inheritdoc />
    protected override void PersistNewItem(IConsent entity)
    {
        entity.AddingEntity();

        ConsentDto dto = ConsentFactory.BuildDto(entity);

        Database.Insert(dto);
        entity.Id = dto.Id;
        entity.ResetDirtyProperties();
    }
コード例 #3
0
    /// <inheritdoc />
    protected override void PersistUpdatedItem(IConsent entity)
    {
        entity.UpdatingEntity();

        ConsentDto dto = ConsentFactory.BuildDto(entity);

        Database.Update(dto);
        entity.ResetDirtyProperties();

        IsolatedCache.Clear(RepositoryCacheKeys.GetKey <IConsent, int>(entity.Id));
    }
コード例 #4
0
        public async Task <IActionResult> Index(ConsentDto model, string returnUrl)
        {
            var request = await _interaction.GetAuthorizationContextAsync(returnUrl);

            ConsentResponse response = new ConsentResponse()
            {
                RememberConsent = true,
                ScopesConsented = request.ScopesRequested
            };
            await _interaction.GrantConsentAsync(request, response);

            return(Redirect(returnUrl));
        }
コード例 #5
0
ファイル: ConsentService.cs プロジェクト: lsrob123/Lx.Sys
        public void AddOrUpdateConsent(ConsentDto consentDto)
        {
            var consent = MappingService.Map <Consent>(consentDto);

            OAuthUowFactory.AddOrUpdateConsent(consent);
        }