Skip to content

Commit ab5602d

Browse files
committed
feat: add IResourceServerContext::getApplicationType method
Signed-off-by: smarcet@gmail.com <smarcet@gmail.com> Change-Id: I671750dd3204a8a0213700b65831e7f756090785
1 parent b3093cc commit ab5602d

2 files changed

Lines changed: 17 additions & 0 deletions

File tree

app/Services/OAuth2/ResourceServerContext.php

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,18 @@ public function getCurrentAccessToken()
4040
}
4141

4242

43+
/**
44+
* @return string
45+
*/
46+
public function getApplicationType()
47+
{
48+
return $this->getAuthContextVar('application_type');
49+
}
50+
51+
private function getAuthContextVar(string $varName)
52+
{
53+
return isset($this->auth_context[$varName]) ? $this->auth_context[$varName] : null;
54+
}
4355
/**
4456
* @return null|string
4557
*/

app/libs/OAuth2/IResourceServerContext.php

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -41,4 +41,9 @@ public function getCurrentUserId();
4141
* @return $this
4242
*/
4343
public function setAuthorizationContext(array $auth_context);
44+
45+
/**
46+
* @return string
47+
*/
48+
public function getApplicationType();
4449
}

0 commit comments

Comments
 (0)