Browse Source

Merge branch 'dev' of https://github.com/abpframework/abp into dev

pull/5261/head
Alper Ebicoglu 6 years ago
parent
commit
cd55cf4087
  1. 4
      docs/en/Community-Articles/2020-08-07-Passwordless-Authentication/POST.md
  2. 8
      docs/en/Tutorials/Part-10.md

4
docs/en/Community-Articles/2020-08-07-Passwordless-Authentication/POST.md

@ -2,7 +2,9 @@
## Introduction
To allow a user login with a magic URL, you need to implement a custom token provider. In this tutorial, we will show you how to add a custom token provider to authenticate a user with a link, instead of entering a password.
In this tutorial, we will show you how to add a custom token provider to authenticate a user with a link, instead of entering a password.
This can be especially useful if you want to make someone login to the application with your user, without sharing your secret password. The generated link will be for a single use.
### Source Code

8
docs/en/Tutorials/Part-10.md

@ -376,6 +376,8 @@ namespace Acme.BookStore.Books
public override async Task<BookDto> GetAsync(Guid id)
{
await CheckGetPolicyAsync();
//Prepare a query to join books and authors
var query = from book in Repository
join author in _authorRepository on book.AuthorId equals author.Id
@ -397,6 +399,8 @@ namespace Acme.BookStore.Books
public override async Task<PagedResultDto<BookDto>>
GetListAsync(PagedAndSortedResultRequestDto input)
{
await CheckGetListPolicyAsync();
//Prepare a query to join books and authors
var query = from book in Repository
join author in _authorRepository on book.AuthorId equals author.Id
@ -495,6 +499,8 @@ namespace Acme.BookStore.Books
public override async Task<BookDto> GetAsync(Guid id)
{
await CheckGetPolicyAsync();
var book = await Repository.GetAsync(id);
var bookDto = ObjectMapper.Map<Book, BookDto>(book);
@ -507,6 +513,8 @@ namespace Acme.BookStore.Books
public override async Task<PagedResultDto<BookDto>>
GetListAsync(PagedAndSortedResultRequestDto input)
{
await CheckGetListPolicyAsync();
//Set a default sorting, if not provided
if (input.Sorting.IsNullOrWhiteSpace())
{

Loading…
Cancel
Save