@@ -9,21 +9,46 @@ <h2 class="nb-card-header-title">
9
9
< nb-card-body >
10
10
< ul >
11
11
< li >
12
- At this step,It 's time to get a user token but primarly we need a
13
- code with the help of code we call getToken API which returns a
14
- token, after a successful authentication to be able to communicate
15
- with the server and, for instance, show username in the header of
16
- the application
12
+ At this step, it 's time to get a user token. Primarily, we need a
13
+ code. With the help of this code, we call the getToken API, which
14
+ returns a token after a successful OAuth 2.0 authentication. This
15
+ token will allow us to communicate with the server and, for
16
+ instance, display the username in the header of the application.
17
17
</ li >
18
18
< li >
19
19
Let's assume that your backend returns a JWT token so that we can
20
20
use the token payload to extract user info out of it. Each Strategy
21
21
specifies which token class is going to be used by default.
22
22
</ li >
23
23
< li >
24
- For example, NbPasswordAuthStrategy uses AuthToken, and AuthProvider
25
- . It is also possible to specify another token class if it is
26
- required.
24
+ This authentication can be managed using different strategies. One
25
+ such strategy is NbPasswordAuthStrategy. This strategy typically
26
+ involves the use of an AuthToken and an AuthProvider to handle
27
+ authentication tasks.
28
+ < ul >
29
+ < li >
30
+ NbPasswordAuthStrategy is a strategy provided by Nebular for
31
+ handling password-based authentication. It simplifies the
32
+ process of logging in and managing user sessions.
33
+ </ li >
34
+ < img
35
+ height ="350px "
36
+ width ="250px "
37
+ src ="../../.././../../assets/env_img/authmodule.png "
38
+ alt ="moduleImg "
39
+ />
40
+ < li >
41
+ AuthToken is used to manage the token received after a
42
+ successful authentication. This token is essential for
43
+ maintaining a session and authorizing subsequent requests to the
44
+ server.
45
+ </ li >
46
+ < li >
47
+ AuthProvider is the service responsible for interacting with the
48
+ backend server to perform authentication operations such as
49
+ login, register, and token refresh.
50
+ </ li >
51
+ </ ul >
27
52
</ li >
28
53
</ ul >
29
54
</ nb-card-body >
@@ -35,16 +60,14 @@ <h2 class="nb-card-header-title">Setting a User token</h2>
35
60
</ nb-card-header >
36
61
< nb-card-body >
37
62
< p >
38
- When we get token we call authorise method, The authorize method is
39
- part of an authentication service. It is designed to handle the
40
- authorization process using a provided secret (such as an
41
- authorization code). This method initiates a command to obtain tokens,
42
- processes the response, and navigates the user based on the
43
- authorization result.
63
+ When we get the token, we call the authorize method. The authorize
64
+ method is part of an authentication service, designed to handle the
65
+ authorization process. This method initiates a request to obtain
66
+ tokens and processes the response.
44
67
</ p >
45
68
< img
46
69
height ="400px "
47
- width ="400px "
70
+ width ="350px "
48
71
src ="../../.././../../assets/env_img/method.png "
49
72
alt ="tokenImg "
50
73
/>
@@ -56,7 +79,7 @@ <h2 class="nb-card-header-title">Setting a User token</h2>
56
79
</ p >
57
80
58
81
< img
59
- height ="300px "
82
+ height ="250px "
60
83
width ="350px "
61
84
src ="../../.././../../assets/env_img/token.png "
62
85
alt ="tokenImg "
0 commit comments