Skip to content

Commit

Permalink
feat(auth): update auth configuration
Browse files Browse the repository at this point in the history
  • Loading branch information
papac committed Apr 11, 2020
1 parent 841647d commit 2873f19
Show file tree
Hide file tree
Showing 40 changed files with 612 additions and 612 deletions.
22 changes: 11 additions & 11 deletions .editorconfig
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
root = true

[*]
charset = utf-8
indent_style = space
indent_size = 4
end_of_line = lf
insert_final_newline = true

[*.{js,jsx,vue,vuex,scss,css,ts,tsx}]
indent_size = 2
root = true

[*]
charset = utf-8
indent_style = space
indent_size = 4
end_of_line = lf
insert_final_newline = true

[*.{js,jsx,vue,vuex,scss,css,ts,tsx}]
indent_size = 2
100 changes: 50 additions & 50 deletions .env.example.json
Original file line number Diff line number Diff line change
@@ -1,50 +1,50 @@
{
"APP_ENV": "development",
"APP_URL": "http://localhost:8000",

"DB_DEFAULT": "mysql",

"MYSQL_HOSTNAME": "127.0.0.1",
"MYSQL_USERNAME": "root",
"MYSQL_PASSWORD": "secret",
"MYSQL_DBNAME": "bowapp",
"MYSQL_CHARSET": "utf8mb4",
"MYSQL_COLLATE": "utf8mb4_unicode_ci",
"MYSQL_ENGINE": "InnoDB",
"MYSQL_PORT": 3306,
"MYSQL_SOCKET": "",
"MYSQL_PREFIX": "",

"S3_KEY": "",
"S3_SECRET": "",
"S3_REGION": "",
"S3_BUCKET": "",

"FTP_HOSTNAME": "localhost",
"FTP_PASSWORD": "password",
"FTP_USERNAME": "username",
"FTP_PORT": 21,
"FTP_STARTROOT": "",
"FTP_TLS": false,
"FTP_TIMEOUT": 50,

"MAIL_DRIVER": "smtp",

"SMTP_HOSTNAME": "localhost",
"SMTP_USERNAME": "username@localhost",
"SMTP_PASSWORD": "password",
"SMTP_PORT": 25,
"SMTP_TLS": false,
"SMTP_SSL": false,
"SMTP_TIMEOUT": 50,

"SESSION_NAME": "BOW",
"SESSION_LIFE": 10800,
"SESSION_PATH": "/",
"SESSION_DOMAIN": null,
"SESSION_SECURE": false,
"SESSION_HTTPONLY": true,

"CONTACT_EMAIL": "username@localhost",
"CONTACT_NAME": "username"
}
{
"APP_ENV": "development",
"APP_URL": "http://localhost:8000",

"DB_DEFAULT": "mysql",

"MYSQL_HOSTNAME": "127.0.0.1",
"MYSQL_USERNAME": "root",
"MYSQL_PASSWORD": "secret",
"MYSQL_DBNAME": "bowapp",
"MYSQL_CHARSET": "utf8mb4",
"MYSQL_COLLATE": "utf8mb4_unicode_ci",
"MYSQL_ENGINE": "InnoDB",
"MYSQL_PORT": 3306,
"MYSQL_SOCKET": "",
"MYSQL_PREFIX": "",

"S3_KEY": "",
"S3_SECRET": "",
"S3_REGION": "",
"S3_BUCKET": "",

"FTP_HOSTNAME": "localhost",
"FTP_PASSWORD": "password",
"FTP_USERNAME": "username",
"FTP_PORT": 21,
"FTP_STARTROOT": "",
"FTP_TLS": false,
"FTP_TIMEOUT": 50,

"MAIL_DRIVER": "smtp",

"SMTP_HOSTNAME": "localhost",
"SMTP_USERNAME": "username@localhost",
"SMTP_PASSWORD": "password",
"SMTP_PORT": 25,
"SMTP_TLS": false,
"SMTP_SSL": false,
"SMTP_TIMEOUT": 50,

"SESSION_NAME": "BOW",
"SESSION_LIFE": 10800,
"SESSION_PATH": "/",
"SESSION_DOMAIN": null,
"SESSION_SECURE": false,
"SESSION_HTTPONLY": true,

"CONTACT_EMAIL": "username@localhost",
"CONTACT_NAME": "username"
}
24 changes: 12 additions & 12 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
.idea/
!.gitignore
composer.lock
node_modules
vendor/
package-lock.json
!.gitkeep
!public/**/.gitkeep
!var/**/.gitkeep
.env.json
config/.key
mix-manifest.json
.idea/
!.gitignore
composer.lock
node_modules
vendor/
package-lock.json
!.gitkeep
!public/**/.gitkeep
!var/**/.gitkeep
.env.json
config/.key
mix-manifest.json
76 changes: 38 additions & 38 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -1,38 +1,38 @@
language: php
dist: trusty

branches:
only:
- 4.0
- master

services:
- mysql

cache:
directories:
- $HOME/.composer/cache

php:
- 7.1

env:
- DB_USER=travis

before_script:
- mysql -u root -e 'CREATE DATABASE IF NOT EXISTS test;'

install:
- composer install --prefer-dist
- composer require twig/twig
- php -r 'file_exists(".env.json") || copy(".env.example.json", ".env.json");'
- php bow run:server --port=5000 &
- sleep 5

matrix:
allow_failures:
- php: nightly
fast_finish: true

script:
- ./vendor/bin/phpunit
language: php
dist: trusty

branches:
only:
- 4.0
- master

services:
- mysql

cache:
directories:
- $HOME/.composer/cache

php:
- 7.1

env:
- DB_USER=travis

before_script:
- mysql -u root -e 'CREATE DATABASE IF NOT EXISTS test;'

install:
- composer install --prefer-dist
- composer require twig/twig
- php -r 'file_exists(".env.json") || copy(".env.example.json", ".env.json");'
- php bow run:server --port=5000 &
- sleep 5

matrix:
allow_failures:
- php: nightly
fast_finish: true

script:
- ./vendor/bin/phpunit
42 changes: 21 additions & 21 deletions LICENSE
Original file line number Diff line number Diff line change
@@ -1,21 +1,21 @@
The MIT License (MIT)

Copyright (c) 2016 Franck DAKIA <[email protected]>

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,
DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR
OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE
OR OTHER DEALINGS IN THE SOFTWARE.
The MIT License (MIT)
Copyright (c) 2016 Franck DAKIA <[email protected]>
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,
DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR
OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE
OR OTHER DEALINGS IN THE SOFTWARE.
5 changes: 2 additions & 3 deletions app/Controller/WelcomeController.php
Original file line number Diff line number Diff line change
Expand Up @@ -11,11 +11,10 @@ class WelcomeController extends Controller
* Show index
*
* @param Request $request
* @param string $name
* @return string
*/
public function __invoke(Request $request, string $name)
public function __invoke(Request $request)
{
return sprintf('Hello, <b>%s</b>', $name);
return response()->render('welcome');
}
}
1 change: 1 addition & 0 deletions app/Kernel.php
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,7 @@ public function configurations()
/**
* Add your Custom Settings here.
*/
// \Policier\Bow\PolicierConfiguration::class,
];
}

Expand Down
2 changes: 1 addition & 1 deletion app/Middleware/Guest.php
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ class Guest
*/
public function process(Request $request, callable $next)
{
if (Auth::guest()) {
if (Auth::getInstance()->guest()) {
return $next($request);
}

Expand Down
Loading

0 comments on commit 2873f19

Please sign in to comment.