Skip to content

Commit

Permalink
Merge pull request #9 from designmynight/override-user-model
Browse files Browse the repository at this point in the history
feat: ability to override the user model
  • Loading branch information
Jaspar Gupta authored Apr 1, 2020
2 parents 8d27631 + a48ce31 commit ee51cb6
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 1 deletion.
9 changes: 9 additions & 0 deletions config/authorizationserver.php
Original file line number Diff line number Diff line change
@@ -1,11 +1,20 @@
<?php

return [

'authorization_url' => env('AUTHORIZATION_SERVER_AUTHORIZATION_URL'),

'redirect_url' => env('AUTHORIZATION_SERVER_REDIRECT_URL'),

'token_url' => env('AUTHORIZATION_SERVER_TOKEN_URL'),

'introspect_url' => env('AUTHORIZATION_SERVER_INTROSPECT_URL'),

'client_id' => env('AUTHORIZATION_SERVER_CLIENT_ID'),

'client_secret' => env('AUTHORIZATION_SERVER_CLIENT_SECRET'),

'scope' => env('AUTHORIZATION_SERVER_SCOPE'),

'model' => \Illuminate\Foundation\Auth\User::class
];
3 changes: 2 additions & 1 deletion src/Introspect.php
Original file line number Diff line number Diff line change
Expand Up @@ -15,12 +15,13 @@ class Introspect
protected $client = null;
protected $result;
protected $userDataKey = 'user';
protected $userModelClass = User::class;
protected $userModelClass;

public function __construct(IntrospectClient $client, Request $request)
{
$this->client = $client;
$this->request = $request;
$this->setUserModelClass(config('authorizationserver.model', User::class));
}

protected function getIntrospectionResult()
Expand Down

0 comments on commit ee51cb6

Please sign in to comment.