Skip to content

Commit ec937fb

Browse files
committed
Merge pull request #618 from LearningLocker/develop
v1.4.0
2 parents a485e09 + 247d4e9 commit ec937fb

File tree

24 files changed

+657
-482
lines changed

24 files changed

+657
-482
lines changed

VERSION

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
1.3.11
1+
1.4.0

app/config/app.php

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -115,7 +115,6 @@
115115
'DaveJamesMiller\Breadcrumbs\ServiceProvider',
116116
'Way\Generators\GeneratorsServiceProvider',
117117
'Barryvdh\Cors\CorsServiceProvider',
118-
'LucaDegasperi\OAuth2Server\OAuth2ServerServiceProvider',
119118
'JsLocalization\JsLocalizationServiceProvider',
120119
'locker\RequestServiceProvider',
121120
'Philo\Translate\TranslateServiceProvider'
@@ -186,10 +185,9 @@
186185
'Validator' => 'Illuminate\Support\Facades\Validator',
187186
'View' => 'Illuminate\Support\Facades\View',
188187
'Breadcrumbs' => 'DaveJamesMiller\Breadcrumbs\Facade',
189-
'AuthorizationServer' => 'LucaDegasperi\OAuth2Server\Facades\AuthorizationServerFacade',
188+
'Authorizer' => 'LucaDegasperi\OAuth2Server\Facades\AuthorizerFacade',
190189
'ResourceServer' => 'LucaDegasperi\OAuth2Server\Facades\ResourceServerFacade',
191-
'LockerRequest' => 'locker\RequestFacade'
192-
190+
'LockerRequest' => 'locker\RequestFacade',
193191
),
194192

195193
);

app/config/database.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -49,8 +49,8 @@
4949
'mysql' => array(
5050
'driver' => 'mysql',
5151
'host' => 'localhost',
52-
'database' => '',
53-
'username' => '',
52+
'database' => 'll_staging',
53+
'username' => 'root',
5454
'password' => '',
5555
'charset' => 'utf8',
5656
'collation' => 'utf8_unicode_ci',

app/config/local/app.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
return array(
44
'providers' => append_config(array(
5-
'Jenssegers\Mongodb\Auth\ReminderServiceProvider'
5+
'Jenssegers\Mongodb\Auth\ReminderServiceProvider',
66
)),
77

88
'debug' => false,
Lines changed: 191 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,191 @@
1+
<?php
2+
3+
return [
4+
5+
/*
6+
|--------------------------------------------------------------------------
7+
| Database Connection to use
8+
|--------------------------------------------------------------------------
9+
|
10+
| Set the default database connection to use for the repositories,
11+
| when set to default, it uses whatever connection you specified in your laravel db config.
12+
|
13+
*/
14+
'database' => 'mysql',
15+
16+
/*
17+
|--------------------------------------------------------------------------
18+
| Supported Grant Types
19+
|--------------------------------------------------------------------------
20+
|
21+
| Your OAuth2 Server can issue an access token based on different grant types
22+
| you can even provide your own grant type.
23+
| To choose which grant type suits your scenario, see
24+
| https://github.com/php-loep/oauth2-server/wiki/Which-OAuth-2.0-grant-should-I-use%3F
25+
|
26+
| Available grant types are:
27+
|
28+
| 'grant_types' => [
29+
|
30+
| 'authorization_code' => [
31+
| 'class' => 'League\OAuth2\Server\Grant\AuthCodeGrant',
32+
| 'access_token_ttl' => 3600,
33+
|
34+
| // the authorization code time to live
35+
| 'auth_token_ttl' => 3600,
36+
| ],
37+
|
38+
| 'password' => [
39+
| 'class' => 'League\OAuth2\Server\Grant\PasswordGrant',
40+
| 'access_token_ttl' => 604800,
41+
|
42+
| // the code to run in order to verify the user's identity
43+
| 'callback' => function($username, $password){
44+
| $credentials = [
45+
| 'email' => $username,
46+
| 'password' => $password,
47+
| ];
48+
|
49+
| if (Auth::once($credentials)) {
50+
| return Auth::user()->id;
51+
| } else {
52+
| return false;
53+
| }
54+
| }
55+
| ],
56+
|
57+
| 'client_credentials' => [
58+
| 'class' => 'League\OAuth2\Server\Grant\ClientCredentialsGrant',
59+
| 'access_token_ttl' => 3600,
60+
| ],
61+
|
62+
| 'refresh_token' => [
63+
| 'class' => 'League\OAuth2\Server\Grant\RefreshTokenGrant',
64+
| 'access_token_ttl' => 3600,
65+
|
66+
| // the refresh token time to live
67+
| 'refresh_token_ttl' => 604800,
68+
|
69+
| // whether or not to issue a new refresh token when a new access token is issued
70+
| 'rotate_refresh_tokens' => false,
71+
| ],
72+
|
73+
| ],
74+
|
75+
*/
76+
77+
'grant_types' => [
78+
'client_credentials' => [
79+
'class' => '\League\OAuth2\Server\Grant\ClientCredentialsGrant',
80+
'access_token_ttl' => 3600
81+
]
82+
],
83+
84+
/*
85+
|--------------------------------------------------------------------------
86+
| Output Token Type
87+
|--------------------------------------------------------------------------
88+
|
89+
| This will tell the authorization server the output format for the access token
90+
| and will tell the resource server how to parse the access token used.
91+
|
92+
| Default value is League\OAuth2\Server\TokenType\Bearer
93+
|
94+
*/
95+
'token_type' => 'League\OAuth2\Server\TokenType\Bearer',
96+
97+
/*
98+
|--------------------------------------------------------------------------
99+
| State Parameter
100+
|--------------------------------------------------------------------------
101+
|
102+
| Whether or not the state parameter is required in the query string
103+
|
104+
*/
105+
'state_param' => false,
106+
107+
/*
108+
|--------------------------------------------------------------------------
109+
| Scope Parameter
110+
|--------------------------------------------------------------------------
111+
|
112+
| Whether or not the scope parameter is required in the query string
113+
|
114+
*/
115+
'scope_param' => false,
116+
117+
/*
118+
|--------------------------------------------------------------------------
119+
| Scope Delimiter
120+
|--------------------------------------------------------------------------
121+
|
122+
| Which character to use to split the scope parameter in the query string
123+
|
124+
*/
125+
'scope_delimiter' => ',',
126+
127+
/*
128+
|--------------------------------------------------------------------------
129+
| Default Scope
130+
|--------------------------------------------------------------------------
131+
|
132+
| The default scope to use if not present in the query string
133+
|
134+
*/
135+
'default_scope' => null,
136+
137+
/*
138+
|--------------------------------------------------------------------------
139+
| Access Token TTL
140+
|--------------------------------------------------------------------------
141+
|
142+
| For how long the issued access token is valid (in seconds)
143+
| this can be also set on a per grant-type basis
144+
|
145+
*/
146+
'access_token_ttl' => 3600,
147+
148+
/*
149+
|--------------------------------------------------------------------------
150+
| Limit clients to specific grants
151+
|--------------------------------------------------------------------------
152+
|
153+
| Whether or not to limit clients to specific grant types
154+
| This is useful to allow only trusted clients to access your API differently
155+
|
156+
*/
157+
'limit_clients_to_grants' => false,
158+
159+
/*
160+
|--------------------------------------------------------------------------
161+
| Limit clients to specific scopes
162+
|--------------------------------------------------------------------------
163+
|
164+
| Whether or not to limit clients to specific scopes
165+
| This is useful to only allow specific clients to use some scopes
166+
|
167+
*/
168+
'limit_clients_to_scopes' => false,
169+
170+
/*
171+
|--------------------------------------------------------------------------
172+
| Limit scopes to specific grants
173+
|--------------------------------------------------------------------------
174+
|
175+
| Whether or not to limit scopes to specific grants
176+
| This is useful to allow certain scopes to be used only with certain grant types
177+
|
178+
*/
179+
'limit_scopes_to_grants' => false,
180+
181+
/*
182+
|--------------------------------------------------------------------------
183+
| HTTP Header Only
184+
|--------------------------------------------------------------------------
185+
|
186+
| This will tell the resource server where to check for the access_token.
187+
| By default it checks both the query string and the http headers
188+
|
189+
*/
190+
'http_headers_only' => false,
191+
];

app/controllers/OAuthAppController.php

Lines changed: 0 additions & 118 deletions
This file was deleted.

0 commit comments

Comments
 (0)