forked from filsh/yii2-oauth2-server
-
Notifications
You must be signed in to change notification settings - Fork 0
Apache ModRewrite
Joseba Juániz edited this page Sep 10, 2015
·
4 revisions
If you are using Apache and you want to use authorization headers for sending login info into the server you will probably see that they are not working at all.
The cause of this problem probably will be that many hosts don't allow by default the use of this header and you'll have to activate it manually.
Open your .htaccess file in charge of the Apache configuration of your Yii2 App Directory and add the following code block after the RewriteEngine On statement:
# Authorization Headers
RewriteCond %{HTTP:Authorization} .
RewriteRule .* - [E=HTTP_AUTHORIZATION:%{HTTP:Authorization}]
And that should do the trick. Now you will be able to send Authentication headers into your OAuth2 server.
-
[Configuration Options] (https://github.com/Patroklo/yii2-oauth2-server/wiki/Configuration-Options)
6.1. Authorization Code
6.3. Password
6.4. Client Credentials