File tree 1 file changed +6
-8
lines changed 1 file changed +6
-8
lines changed Original file line number Diff line number Diff line change @@ -39,38 +39,36 @@ public function __invoke()
39
39
$ scope = implode (' ' , array_keys ($ scope ));
40
40
$ server ->setDefaultScope ($ scope );
41
41
42
- $ tokenExpiresIn = new DateInterval ($ this ->config ->get ('oauth.expire_in.token ' ));
43
-
44
42
$ server ->enableGrantType (
45
43
new \League \OAuth2 \Server \Grant \ClientCredentialsGrant (),
46
- $ tokenExpiresIn
44
+ new DateInterval ( $ this -> config -> get ( ' oauth.expire_in.personal_token ' ))
47
45
);
48
46
49
47
$ server ->enableGrantType (
50
48
$ this ->makeAuthCodeGrant (),
51
- $ tokenExpiresIn
49
+ new DateInterval ( $ this -> config -> get ( ' oauth.expire_in.personal_token ' ))
52
50
);
53
51
54
52
$ server ->enableGrantType (
55
53
$ this ->makeRefreshTokenGrant (),
56
- $ tokenExpiresIn
54
+ new DateInterval ( $ this -> config -> get ( ' oauth.expire_in.refresh_token ' ))
57
55
);
58
56
59
57
$ server ->enableGrantType (
60
58
$ this ->makePasswordGrant (),
61
- $ tokenExpiresIn
59
+ new DateInterval ( $ this -> config -> get ( ' oauth.expire_in.token ' ))
62
60
);
63
61
64
62
if ($ this ->config ->get ('oauth.use_otp_grant ' , false )) {
65
63
$ server ->enableGrantType (
66
64
$ this ->makeOtpGrant (),
67
- $ tokenExpiresIn
65
+ new DateInterval ( $ this -> config -> get ( ' oauth.expire_in.token ' ))
68
66
);
69
67
}
70
68
71
69
$ server ->enableGrantType (
72
70
$ this ->makeUserGrant (),
73
- $ tokenExpiresIn
71
+ new DateInterval ( $ this -> config -> get ( ' oauth.expire_in.token ' ))
74
72
);
75
73
76
74
return $ server ;
You can’t perform that action at this time.
0 commit comments