Commit 9ec1c5e
Vadim Belov
Make RefreshToken method handle nullable requests
Updated the `RefreshToken` method to support nullable `request`
parameters, ensuring robustness when the request object is not
provided. Improved null safety by using the null-conditional
operator (`?.`) for accessing `RefreshToken`. Added logic to
create a new `RefreshTokenRequestDto` when `request` is null
and a cookie is available. Enhanced validation to prevent
potential `NullReferenceException` errors.1 parent bbc1b93 commit 9ec1c5e
2 files changed
Lines changed: 7 additions & 8 deletions
File tree
- Sources/EasyExtensions.AspNetCore.Authorization
- Controllers
- Models/Dto
Lines changed: 6 additions & 4 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
71 | 71 | | |
72 | 72 | | |
73 | 73 | | |
74 | | - | |
| 74 | + | |
75 | 75 | | |
76 | | - | |
| 76 | + | |
77 | 77 | | |
78 | 78 | | |
79 | 79 | | |
80 | 80 | | |
81 | | - | |
| 81 | + | |
| 82 | + | |
| 83 | + | |
82 | 84 | | |
83 | 85 | | |
84 | 86 | | |
85 | | - | |
| 87 | + | |
86 | 88 | | |
87 | 89 | | |
88 | 90 | | |
| |||
Lines changed: 1 addition & 4 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | | - | |
2 | | - | |
3 | | - | |
| 1 | + | |
4 | 2 | | |
5 | 3 | | |
6 | 4 | | |
| |||
10 | 8 | | |
11 | 9 | | |
12 | 10 | | |
13 | | - | |
14 | 11 | | |
15 | 12 | | |
16 | 13 | | |
0 commit comments