Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fixing minor code quality issues #231

Merged
merged 4 commits into from
Mar 16, 2018
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -4,3 +4,4 @@ composer.phar
composer.lock
phpunit.xml
vendor
.env
14 changes: 6 additions & 8 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,6 @@
[![Build Status](https://travis-ci.org/auth0/auth0-PHP.png)](https://travis-ci.org/auth0/auth0-PHP)
[![Code Climate](https://codeclimate.com/github/auth0/auth0-PHP/badges/gpa.svg)](https://codeclimate.com/github/auth0/auth0-PHP)
[![Test Coverage](https://codeclimate.com/github/auth0/auth0-PHP/badges/coverage.svg)](https://codeclimate.com/github/auth0/auth0-PHP/coverage)
[![Dependencies](https://www.versioneye.com/php/auth0:auth0-php/badge.svg)](https://www.versioneye.com/php/auth0:auth0-php)
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[![HHVM Status](http://hhvm.h4cc.de/badge/auth0/auth0-php.svg)](http://hhvm.h4cc.de/package/auth0/auth0-php)
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not workin'

[![License](https://poser.pugx.org/auth0/auth0-php/license)](https://packagist.org/packages/auth0/auth0-php)
[![Total Downloads](https://poser.pugx.org/auth0/auth0-php/downloads)](https://packagist.org/packages/auth0/auth0-php)

Expand Down Expand Up @@ -62,7 +60,7 @@ Accepted params:
- **cache**: Receives an instance of `Auth0\SDK\Helpers\Cache\CacheHandler` (Supported `FileSystemCacheHandler` and `NoCacheHandler`). Defaults to `NoCacheHandler`.
- **guzzle_options**: Configuration propagated to guzzle when fetching the JWKs.
- **supported_algs**: `RS256` and `HS256` supported. Defaults to `HS256`.
- **valid_audiences**: List of audiences that identifies the API (usefull for multitenant environments).
- **valid_audiences**: List of audiences that identifies the API (useful for multi-tenant environments).
- **authorized_iss**: List of issues authorized to sign tokens for the API.
- **client_secret**: Client secret used to verify the token signature (only for `HS256`).
- **secret_base64_encoded**: When `true`, it will decode the secret used to verify the token signature. Defaults to `true` (used only for `HS256`).
Expand Down Expand Up @@ -156,7 +154,7 @@ This is a common issue with latest PHP versions under windows (related to a inco

> I am not using composer, my host does not allow using Composer

This package uses composer for mantianing dependencies. However, if you cannot use composer on your server. Please follow the following steps and upload these dependencies manually.
This package uses composer for maintaining dependencies. However, if you cannot use composer on your server. Please follow the following steps and upload these dependencies manually.

- Download and install composer on your local environment.
- Install auth0-PHP using composer.
Expand All @@ -172,7 +170,7 @@ This package uses composer for mantianing dependencies. However, if you cannot u

#### 4.0

- Soon to deprecate the following clases:
- Soon to deprecate the following classes:
+ Auth0\SDK\Auth0Api: use \Auth0\SDK\API\Management instead
+ Auth0\SDK\Auth0AuthApi: use \Auth0\SDK\API\Authentication instead
+ Auth0\SDK\Auth0JWT: Use \Auth0\SDK\JWTVerifier instead
Expand All @@ -182,7 +180,7 @@ This package uses composer for mantianing dependencies. However, if you cannot u

#### 3.x

- SDK api changes, now the Auth0 API client is not build of static clases anymore. Usage example:
- SDK api changes, now the Auth0 API client is not build of static classes anymore. Usage example:
```php
$token = "eyJhbGciO....eyJhdWQiOiI....1ZVDisdL...";
$domain = "account.auth0.com";
Expand Down Expand Up @@ -282,7 +280,7 @@ This SDK uses [Composer](http://getcomposer.org/doc/01-basic-usage.md) to manage

Auth0 helps you to:

* Add authentication with [multiple authentication sources](https://docs.auth0.com/identityproviders), either social like **Google, Facebook, Microsoft Account, LinkedIn, GitHub, Twitter, Box, Salesforce, amont others**, or enterprise identity systems like **Windows Azure AD, Google Apps, Active Directory, ADFS or any SAML Identity Provider**.
* Add authentication with [multiple authentication sources](https://docs.auth0.com/identityproviders), either social like **Google, Facebook, Microsoft Account, LinkedIn, GitHub, Twitter, Box, Salesforce, among others**, or enterprise identity systems like **Windows Azure AD, Google Apps, Active Directory, ADFS or any SAML Identity Provider**.
* Add authentication through more traditional **[username/password databases](https://docs.auth0.com/mysql-connection-tutorial)**.
* Add support for **[linking different user accounts](https://docs.auth0.com/link-accounts)** with the same user.
* Support for generating signed [Json Web Tokens](https://docs.auth0.com/jwt) to call your APIs and **flow the user identity** securely.
Expand All @@ -300,7 +298,7 @@ If you have found a bug or if you have a feature request, please report them at

## Author

[Auth0](auth0.com)
[Auth0](https://auth0.com)

## License

Expand Down
4 changes: 2 additions & 2 deletions examples/basic-api/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ In order to run the example you need to have `composer` and `php` installed.

Make sure that your app using `RS256` signature algorithm. You can change it under advanced settings of your app in tab `OAuth`.

You also need to set the ClientSecret and ClientId for your Auth0 app as enviroment variables with the following names respectively: `AUTH0_CLIENT_SECRET` and `AUTH0_CLIENT_ID`.
You also need to set the ClientSecret and ClientId for your Auth0 app as environment variables with the following names respectively: `AUTH0_CLIENT_SECRET` and `AUTH0_CLIENT_ID`.

For that, if you just create a file named `.env` in the directory and set the values like the following, the app will just work:

Expand All @@ -18,7 +18,7 @@ AUTH0_CLIENT_SECRET=myCoolSecret
AUTH0_CLIENT_ID=myCoolClientId
````

Once you've set those 2 enviroment variables, just run the following to get the app started:
Once you've set those 2 environment variables, just run the following to get the app started:

````bash
composer install
Expand Down
1 change: 0 additions & 1 deletion examples/basic-api/index.php
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@ function apache_request_headers() {
foreach($_SERVER as $key => $val) {
if( preg_match($rx_http, $key) ) {
$arh_key = preg_replace($rx_http, '', $key);
$rx_matches = array();
// do some nasty string manipulations to restore the original letter case
// this should work in most cases
$rx_matches = explode('_', $arh_key);
Expand Down
3 changes: 1 addition & 2 deletions examples/basic-oauth/public/app.css
Original file line number Diff line number Diff line change
Expand Up @@ -85,10 +85,9 @@ label {
}
.answer {
width: 70%;
margin: auto;
margin: auto auto 20px;
text-align: left;
padding-left: 10%;
margin-bottom: 20px;
}
.login-page .login-box {
padding: 100px 0;
Expand Down
7 changes: 2 additions & 5 deletions examples/basic-oauth/update-metadata.php
Original file line number Diff line number Diff line change
Expand Up @@ -23,10 +23,7 @@
?>

<form action="?update-metadata" method="POST">

<textarea name='metadata'>
<?php echo json_encode($userInfo["user_metadata"]); ?>
</textarea>

<label for="field-metadata"></label>
<textarea name="metadata" id="field-metadata"><?php echo json_encode($userInfo["user_metadata"]); ?></textarea>
<input type="submit" name="update" value="Update" />
</form>
3 changes: 1 addition & 2 deletions examples/basic-webapp/public/app.css
Original file line number Diff line number Diff line change
Expand Up @@ -85,10 +85,9 @@ label {
}
.answer {
width: 70%;
margin: auto;
margin: auto auto 20px;
text-align: left;
padding-left: 10%;
margin-bottom: 20px;
}
.login-page .login-box {
padding: 100px 0;
Expand Down
Loading