Blame view

common/config/main.php 8.06 KB
abf1649b   andryeyev   Чистая установка ...
1
2
3
  <?php
  return [
      'vendorPath' => dirname(dirname(__DIR__)) . '/vendor',
b2a15e0c   Dmitryi   роли и права поль...
4
      'modules' => [
2f8b8e0f   Dmitryi   this commin on a ...
5
6
         'permit' => [
              'class' => 'common\components\developeruz\db_rbac\Yii2DbRbac',
b2a15e0c   Dmitryi   роли и права поль...
7
8
9
10
              'params' => [
                  'userClass' => 'common\models\User'
              ]
          ],
77d30544   Yarik   Начата разработка...
11
12
13
          'blog' => [
          	'class' => 'common\modules\blog\Module',
          ],
b2a15e0c   Dmitryi   роли и права поль...
14
      ],
abf1649b   andryeyev   Чистая установка ...
15
16
17
18
      'components' => [
          'cache' => [
              'class' => 'yii\caching\FileCache',
          ],
ab4d7cb1   andryeyev   Page + Языковая в...
19
          'urlManager' => [
9da32470   Administrator   routs
20
              'enablePrettyUrl' => true,
ab4d7cb1   andryeyev   Page + Языковая в...
21
22
23
              'showScriptName' => false,
              'class'=> 'common\components\LangUrlManager',
              'rules'=>[
b2a15e0c   Dmitryi   роли и права поль...
24
25
                  '<module:\w+>/<controller:\w+>/<action:(\w|-)+>' => '<module>/<controller>/<action>',
                  '<module:\w+>/<controller:\w+>/<action:(\w|-)+>/<id:\d+>' => '<module>/<controller>/<action>',
ab4d7cb1   andryeyev   Page + Языковая в...
26
27
28
29
30
31
32
              ]
          ],
          'request' => [
              'class' => 'common\components\LangRequest'
          ],
          'i18n' => [
              'translations' => [
61227ce7   andryeyev   + fix login/trans...
33
                  '*' => [
ab4d7cb1   andryeyev   Page + Языковая в...
34
                      'class' => 'yii\i18n\PhpMessageSource',
69bd5fc6   Yarik   Добавлены языки п...
35
                      'basePath' => '@common/translation', 
ab4d7cb1   andryeyev   Page + Языковая в...
36
37
38
39
40
                      'fileMap' => [
                          'app' => 'app.php',
                          'app/error' => 'error.php', 
                      ],
                  ],
61227ce7   andryeyev   + fix login/trans...
41
42
43
44
45
46
47
48
                  'app' => [
                      'class' => 'yii\i18n\PhpMessageSource',
                      'basePath' => '@common/translation', 
                      'fileMap' => [
                          'app' => 'app.php',
                          'app/error' => 'error.php', 
                      ],
                  ]
ab4d7cb1   andryeyev   Page + Языковая в...
49
50
              ],
          ],
b2a15e0c   Dmitryi   роли и права поль...
51
52
53
           'authManager' => [
            'class' => 'yii\rbac\DbManager',
          ],
280e92c2   Dmitryi   авторизация через...
54
55
56
57
          
          //подключаем конфигурации API соц сетей для авторизации
          
          'eauth' => [
f91c1ae8   Dmitryi   new commit compon...
58
              'class' => 'common\components\nodge\eauth\src\EAuth',
280e92c2   Dmitryi   авторизация через...
59
60
61
62
63
64
65
66
67
68
              'popup' => true, // Use the popup window instead of redirecting.
              'cache' => false, // Cache component name or false to disable cache. Defaults to 'cache' on production environments.
              'cacheExpire' => 0, // Cache lifetime. Defaults to 0 - means unlimited.
              'httpClient' => [
                  // uncomment this to use streams in safe_mode
                  //'useStreamsFallback' => true,
              ],
              'services' => [ // You can change the providers and their classes.
                  'google' => [
                      // register your app here: https://code.google.com/apis/console/
f91c1ae8   Dmitryi   new commit compon...
69
                      'class' => 'common\components\nodge\eauth\src\services\GoogleOAuth2Service',
280e92c2   Dmitryi   авторизация через...
70
71
72
73
74
75
                      'clientId' => 'artbox-1138',
                      'clientSecret' => '',
                      'title' => 'Google',
                  ],
                  'twitter' => [
                      // register your app here: https://dev.twitter.com/apps/new
f91c1ae8   Dmitryi   new commit compon...
76
                      'class' => 'common\components\nodge\eauth\src\services\TwitterOAuth1Service',
280e92c2   Dmitryi   авторизация через...
77
78
79
80
81
                      'key' => '8vReLxI63vTs98MBMqhvrszwy',
                      'secret' => 'jOqNbHIkQw4cVKKJkgrMtaEeCcfbeT1GTik4pF6O9D7AmqcwOG',
                  ],
                  'yandex' => [
                      // register your app here: https://oauth.yandex.ru/client/my
f91c1ae8   Dmitryi   new commit compon...
82
                      'class' => 'common\components\nodge\eauth\src\services\YandexOAuth2Service',
280e92c2   Dmitryi   авторизация через...
83
84
85
86
87
88
                      'clientId' => 'ea13195ac0424ff8a190838bec41bb71',
                      'clientSecret' => '911f2c9afcbf4f5f9319b3134c096c86',
                      'title' => 'Yandex',
                  ],
                  'facebook' => [
                      // register your app here: https://developers.facebook.com/apps/
f91c1ae8   Dmitryi   new commit compon...
89
                      'class' => 'common\components\nodge\eauth\src\services\FacebookOAuth2Service',
280e92c2   Dmitryi   авторизация через...
90
91
92
93
                      'clientId' => '1642047622727997',
                      'clientSecret' => 'f5b7ba4f062a568678b764fc74cc416e',
                  ],
                  'yahoo' => [
f91c1ae8   Dmitryi   new commit compon...
94
                      'class' => 'common\components\nodge\eauth\src\services\YahooOpenIDService',
280e92c2   Dmitryi   авторизация через...
95
96
97
98
                      //'realm' => '*.example.org', // your domain, can be with wildcard to authenticate on subdomains.
                  ],
                  'linkedin' => [
                      // register your app here: https://www.linkedin.com/secure/developer
f91c1ae8   Dmitryi   new commit compon...
99
                      'class' => 'common\components\nodge\eauth\src\services\LinkedinOAuth1Service',
280e92c2   Dmitryi   авторизация через...
100
101
102
103
104
105
                      'key' => '77s41eixn3dyvo',
                      'secret' => '1xLZQ7RRK6RNjo4U',
                      'title' => 'LinkedIn (OAuth1)',
                  ],
                  'linkedin_oauth2' => [
                      // register your app here: https://www.linkedin.com/secure/developer
f91c1ae8   Dmitryi   new commit compon...
106
                      'class' => 'common\components\nodge\eauth\src\services\LinkedinOAuth2Service',
280e92c2   Dmitryi   авторизация через...
107
108
109
110
111
112
                      'clientId' => '77s41eixn3dyvo',
                      'clientSecret' => '1xLZQ7RRK6RNjo4U',
                      'title' => 'LinkedIn (OAuth2)',
                  ],
                  'github' => [
                      // register your app here: https://github.com/settings/applications
f91c1ae8   Dmitryi   new commit compon...
113
                      'class' => 'common\components\nodge\eauth\src\services\GitHubOAuth2Service',
280e92c2   Dmitryi   авторизация через...
114
115
116
117
118
                      'clientId' => 'd00283b5cfb225cd1600',
                      'clientSecret' => 'f482361fad7184819d452f421c8b09db60830b42',
                  ],
                  'live' => [
                      // register your app here: https://account.live.com/developers/applications/index
f91c1ae8   Dmitryi   new commit compon...
119
                      'class' => 'common\components\nodge\eauth\src\services\LiveOAuth2Service',
280e92c2   Dmitryi   авторизация через...
120
121
122
123
                      'clientId' => '00000000481796AE',
                      'clientSecret' => 'rt9GiJrlKz3sE6CvdOeuwWyYbl1tQT03',
                  ],
                  'steam' => [
f91c1ae8   Dmitryi   new commit compon...
124
                      'class' => 'common\components\nodge\eauth\src\services\SteamOpenIDService',
280e92c2   Dmitryi   авторизация через...
125
126
127
128
                      //'realm' => '*.example.org', // your domain, can be with wildcard to authenticate on subdomains.
                  ],
                  'instagram' => [
                      // register your app here: https://instagram.com/developer/register/
f91c1ae8   Dmitryi   new commit compon...
129
                      'class' => 'common\components\nodge\eauth\src\services\InstagramOAuth2Service',
280e92c2   Dmitryi   авторизация через...
130
131
132
133
134
                      'clientId' => '...',
                      'clientSecret' => '...',
                  ],
                  'vkontakte' => [
                      // register your app here: https://vk.com/editapp?act=create&site=1
f91c1ae8   Dmitryi   new commit compon...
135
                      'class' => 'common\components\nodge\eauth\src\services\VKontakteOAuth2Service',
280e92c2   Dmitryi   авторизация через...
136
137
138
139
140
                      'clientId' => '5155388',
                      'clientSecret' => 'jxgmdGVQw7huGKRpnX3a',
                  ],
                  'mailru' => [
                      // register your app here: http://api.mail.ru/sites/my/add
f91c1ae8   Dmitryi   new commit compon...
141
                      'class' => 'common\components\nodge\eauth\src\services\MailruOAuth2Service',
280e92c2   Dmitryi   авторизация через...
142
143
144
145
146
147
                      'clientId' => '739322',
                      'clientSecret' => 'd6ce7be6ff791375adff58fe0e4460b2',
                  ],
                  'odnoklassniki' => [
                      // register your app here: http://dev.odnoklassniki.ru/wiki/pages/viewpage.action?pageId=13992188
                      // ... or here: http://www.odnoklassniki.ru/dk?st.cmd=appsInfoMyDevList&st._aid=Apps_Info_MyDev
f91c1ae8   Dmitryi   new commit compon...
148
                      'class' => 'common\components\nodge\eauth\src\services\OdnoklassnikiOAuth2Service',
280e92c2   Dmitryi   авторизация через...
149
150
151
152
153
154
155
156
157
158
159
160
161
162
                      'clientId' => '...',
                      'clientSecret' => '...',
                      'clientPublic' => '...',
                      'title' => 'Odnoklas.',
                      ],
              ],
          ],
          
          // (optionally) you can configure logging
          'log' => [
              'targets' => [
                  [
                      'class' => 'yii\log\FileTarget',
                      'logFile' => '@app/runtime/logs/eauth.log',
f91c1ae8   Dmitryi   new commit compon...
163
                      'categories' => ['common\components\nodge\eauth\nodge\eauth\*'],
280e92c2   Dmitryi   авторизация через...
164
165
166
167
168
169
170
171
172
                      'logVars' => [],
                  ],
              ],
          ],
          
          /*========End=======
           *end api sicial
           *  */
          
abf1649b   andryeyev   Чистая установка ...
173
      ],
69bd5fc6   Yarik   Добавлены языки п...
174
      'language' => 'ru-RU'
abf1649b   andryeyev   Чистая установка ...
175
  ];