This repository has been archived by the owner on Oct 6, 2020. It is now read-only.
forked from philsturgeon/codeigniter-oauth2
-
Notifications
You must be signed in to change notification settings - Fork 35
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Added configuration for Misfit provider
- Loading branch information
1 parent
c62575d
commit c3e2a28
Showing
1 changed file
with
53 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,53 @@ | ||
<?php | ||
|
||
namespace OAuth2\Provider; | ||
|
||
use OAuth2\Provider; | ||
use OAuth2\Token_Access; | ||
|
||
/* | ||
* Misfit API credentials: https://build.misfit.com/apps | ||
* Misfit API docs: https://build.misfit.com/docs | ||
*/ | ||
|
||
|
||
/** | ||
* Misfit OAuth Provider | ||
* | ||
* @package laravel-oauth2 | ||
* @category Provider | ||
* @author Hannes Van De Vreken | ||
*/ | ||
|
||
class Misfit extends Provider { | ||
/** | ||
* @var string provider name | ||
*/ | ||
public $name = 'misfit'; | ||
|
||
/** | ||
* @var string the method to use when requesting tokens | ||
*/ | ||
protected $method = 'POST'; | ||
|
||
/** | ||
* Returns the authorization URL for the provider. | ||
* | ||
* @return string | ||
*/ | ||
public function url_authorize() | ||
{ | ||
return 'https://api.misfitwearables.com/auth/dialog/authorize'; | ||
} | ||
|
||
/** | ||
* Returns the access token endpoint for the provider. | ||
* | ||
* @return string | ||
*/ | ||
public function url_access_token() | ||
{ | ||
return 'https://api.misfitwearables.com/auth/tokens/exchange'; | ||
} | ||
} | ||
|