Skip to content

Commit

Permalink
updated readme and added tenency support to config
Browse files Browse the repository at this point in the history
  • Loading branch information
daveismynamecom committed May 19, 2019
1 parent ac902f4 commit d5446e7
Show file tree
Hide file tree
Showing 4 changed files with 40 additions and 28 deletions.
3 changes: 2 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1 +1,2 @@
.DS_Store
.DS_Store
.idea
4 changes: 2 additions & 2 deletions composer.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "daveismyname/laravel-microsoft-graph",
"description": "A Laravel Microsoft Graph API package",
"description": "A Laravel Microsoft Graph API (Office365) package",
"license": "MIT",
"authors": [
{
Expand All @@ -10,7 +10,7 @@
}
],
"homepage": "https://github.com/daveismyname/laravel-microsoft-graph",
"keywords": ["Laravel", "MsGraph", "Graph", "Microsoft Graph"],
"keywords": ["Laravel", "MsGraph", "Graph", "Microsoft Graph", "Office365"],
"require": {
"illuminate/support": "~5",
"league/oauth2-client": "^1.4",
Expand Down
33 changes: 22 additions & 11 deletions config/msgraph.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,10 @@

return [

/*
* the clientId is set from the Microsoft portal to identify the application
* https://apps.dev.microsoft.com
*/
/*
* the clientId is set from the Microsoft portal to identify the application
* https://apps.dev.microsoft.com
*/
'clientId' => env('MSGRAPH_CLIENT_ID'),

/*
Expand All @@ -15,8 +15,8 @@
'clientSecret' => env('MSGRAPH_SECRET_ID'),

/*
* Set the url to trigger the oauth process this url should call return MsGraph::connect();
*/
* Set the url to trigger the oauth process this url should call return MsGraph::connect();
*/
'redirectUri' => env('MSGRAPH_OAUTH_URL'),

/*
Expand All @@ -25,25 +25,36 @@

'msgraphLandingUri' => env('MSGRAPH_LANDING_URL'),

/*
/*
set the tenant authorize url
*/

'tenantUrlAuthorize' => env('MSGRAPH_TENANT_AUTHORIZE'),

/*
set the tenant token url
*/
'tenantUrlAccessToken' => env('MSGRAPH_TENANT_TOKEN'),

/*
set the authorize url
*/

'urlAuthorize' => 'https://login.microsoftonline.com/common/oauth2/v2.0/authorize',

/*
/*
set the token url
*/
'urlAccessToken' => 'https://login.microsoftonline.com/common/oauth2/v2.0/token',

/*
/*
set the scopes to be used, Microsoft Graph API will accept up to 20 scopes
*/

'scopes' => 'offline_access openid calendars.readwrite contacts.readwrite files.readwrite mail.readwrite mail.send tasks.readwrite mailboxsettings.readwrite user.readwrite',

/*
/*
The default timezone is set to Europe/London this option allows you to set your prefered timetime
*/
'preferTimezone' => env('MSGRAPH_PREFER_TIMEZONE', 'outlook.timezone="Europe/London"'),
];
];
28 changes: 14 additions & 14 deletions readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -47,18 +47,6 @@ In Laravel 5.5 the service provider will automatically get registered. In older
];
```

You can publish the migration with:

```bash
php artisan vendor:publish --provider="Daveismyname\MsGraph\MsGraphServiceProvider" --tag="migrations"
```

After the migration has been published you can create the tokens tables by running the migration:

```bash
php artisan migrate
```

You can publish the config file with:

```bash
Expand Down Expand Up @@ -130,7 +118,19 @@ return [
];
```

Ensure you've set the following urls in your .env file:
You can publish the migration with:

```bash
php artisan vendor:publish --provider="Daveismyname\MsGraph\MsGraphServiceProvider" --tag="migrations"
```

After the migration has been published you can create the tokens tables by running the migration:

```bash
php artisan migrate
```

Ensure you've set the following in your .env file:

```bash
MSGRAPH_CLIENT_ID=
Expand All @@ -154,7 +154,7 @@ To find your Office 365 tenant ID in the Azure AD admin center

Optionally add
```bash
MSGRAPH_PREFER_TIMEZONE=
MSGRAPH_PREFER_TIMEZONE='outlook.timezone="Europe/London"'
```


Expand Down

0 comments on commit d5446e7

Please sign in to comment.