File tree Expand file tree Collapse file tree 2 files changed +12
-3
lines changed Expand file tree Collapse file tree 2 files changed +12
-3
lines changed Original file line number Diff line number Diff line change @@ -21,6 +21,13 @@ class Passport
21
21
*/
22
22
public static $ implicitGrantEnabled = false ;
23
23
24
+ /**
25
+ * Indicates if the password grant type is enabled.
26
+ *
27
+ * @var bool|null
28
+ */
29
+ public static $ passwordGrantEnabled = true ;
30
+
24
31
/**
25
32
* The default scope.
26
33
*
Original file line number Diff line number Diff line change @@ -169,9 +169,11 @@ protected function registerAuthorizationServer()
169
169
$ this ->makeRefreshTokenGrant (), Passport::tokensExpireIn ()
170
170
);
171
171
172
- $ server ->enableGrantType (
173
- $ this ->makePasswordGrant (), Passport::tokensExpireIn ()
174
- );
172
+ if (Passport::$ passwordGrantEnabled ) {
173
+ $ server ->enableGrantType (
174
+ $ this ->makePasswordGrant (), Passport::tokensExpireIn ()
175
+ );
176
+ }
175
177
176
178
$ server ->enableGrantType (
177
179
new PersonalAccessGrant , Passport::personalAccessTokensExpireIn ()
You can’t perform that action at this time.
0 commit comments