File tree Expand file tree Collapse file tree 5 files changed +12
-13
lines changed
framework/auth/strategies
playground/without-layout/auth Expand file tree Collapse file tree 5 files changed +12
-13
lines changed Original file line number Diff line number Diff line change @@ -47,6 +47,7 @@ export class NbOAuth2AuthStrategyOptions extends NbAuthStrategyOptions {
47
47
} = {
48
48
endpoint : 'authorize' ,
49
49
responseType : NbOAuth2ResponseType . CODE ,
50
+ requireValidToken : true ,
50
51
} ;
51
52
token ?: {
52
53
endpoint ?: string ;
@@ -58,7 +59,7 @@ export class NbOAuth2AuthStrategyOptions extends NbAuthStrategyOptions {
58
59
} = {
59
60
endpoint : 'token' ,
60
61
grantType : NbOAuth2GrantType . AUTHORIZATION_CODE ,
61
- requireValidToken : false ,
62
+ requireValidToken : true ,
62
63
class : NbAuthOAuth2Token ,
63
64
} ;
64
65
refresh ?: {
@@ -69,6 +70,7 @@ export class NbOAuth2AuthStrategyOptions extends NbAuthStrategyOptions {
69
70
} = {
70
71
endpoint : 'token' ,
71
72
grantType : NbOAuth2GrantType . REFRESH_TOKEN ,
73
+ requireValidToken : true ,
72
74
} ;
73
75
}
74
76
Original file line number Diff line number Diff line change @@ -55,7 +55,7 @@ import { NbAuthStrategyClass } from '../../auth.options';
55
55
* endpoint?: string;
56
56
* redirectUri?: string;
57
57
* responseType?: string;
58
- * requireValidToken: false ,
58
+ * requireValidToken: true ,
59
59
* scope?: string;
60
60
* state?: string;
61
61
* params?: { [key: string]: string };
@@ -66,7 +66,7 @@ import { NbAuthStrategyClass } from '../../auth.options';
66
66
* token?: {
67
67
* endpoint?: string;
68
68
* grantType?: string;
69
- * requireValidToken: false ,
69
+ * requireValidToken: true ,
70
70
* redirectUri?: string;
71
71
* scope?: string;
72
72
* class: NbAuthTokenClass,
@@ -79,7 +79,7 @@ import { NbAuthStrategyClass } from '../../auth.options';
79
79
* endpoint?: string;
80
80
* grantType?: string;
81
81
* scope?: string;
82
- * requireValidToken: false ,
82
+ * requireValidToken: true ,
83
83
* } = {
84
84
* endpoint: 'token',
85
85
* grantType: NbOAuth2GrantType.REFRESH_TOKEN,
Original file line number Diff line number Diff line change @@ -43,7 +43,7 @@ export class NbPasswordAuthStrategyOptions extends NbAuthStrategyOptions {
43
43
alwaysFail : false ,
44
44
endpoint : 'login' ,
45
45
method : 'post' ,
46
- requireValidToken : false ,
46
+ requireValidToken : true ,
47
47
redirect : {
48
48
success : '/' ,
49
49
failure : null ,
@@ -55,7 +55,7 @@ export class NbPasswordAuthStrategyOptions extends NbAuthStrategyOptions {
55
55
alwaysFail : false ,
56
56
endpoint : 'register' ,
57
57
method : 'post' ,
58
- requireValidToken : false ,
58
+ requireValidToken : true ,
59
59
redirect : {
60
60
success : '/' ,
61
61
failure : null ,
@@ -98,7 +98,7 @@ export class NbPasswordAuthStrategyOptions extends NbAuthStrategyOptions {
98
98
refreshToken ?: boolean | NbPasswordStrategyModule = {
99
99
endpoint : 'refresh-token' ,
100
100
method : 'post' ,
101
- requireValidToken : false ,
101
+ requireValidToken : true ,
102
102
redirect : {
103
103
success : null ,
104
104
failure : null ,
Original file line number Diff line number Diff line change @@ -31,7 +31,7 @@ import { NbAuthIllegalTokenError } from '../../services/token/token';
31
31
* alwaysFail: false,
32
32
* endpoint: 'login',
33
33
* method: 'post',
34
- * requireValidToken: false ,
34
+ * requireValidToken: true ,
35
35
* redirect: {
36
36
* success: '/',
37
37
* failure: null,
@@ -43,7 +43,7 @@ import { NbAuthIllegalTokenError } from '../../services/token/token';
43
43
* alwaysFail: false,
44
44
* endpoint: 'register',
45
45
* method: 'post',
46
- * requireValidToken: false ,
46
+ * requireValidToken: true ,
47
47
* redirect: {
48
48
* success: '/',
49
49
* failure: null,
@@ -86,7 +86,7 @@ import { NbAuthIllegalTokenError } from '../../services/token/token';
86
86
* refreshToken?: boolean | NbPasswordStrategyModule = {
87
87
* endpoint: 'refresh-token',
88
88
* method: 'post',
89
- * requireValidToken: false ,
89
+ * requireValidToken: true ,
90
90
* redirect: {
91
91
* success: null,
92
92
* failure: null,
Original file line number Diff line number Diff line change @@ -89,9 +89,6 @@ export function filterInterceptorRequest(req: HttpRequest<any>) {
89
89
token : {
90
90
class : NbAuthJWTToken ,
91
91
} ,
92
- login : {
93
- requireValidToken : false ,
94
- } ,
95
92
baseEndpoint : 'http://localhost:4400/api/auth/' ,
96
93
logout : {
97
94
redirect : {
You can’t perform that action at this time.
0 commit comments