public class DefaultContextHelperService extends Object implements ContextHelperService
Modifier and Type | Field and Description |
---|---|
protected AuthorizationServerService<AuthorizationServer> |
authorizationServerService |
protected AuthorizedClientService<AuthorizedClient> |
authorizedClientService |
Constructor and Description |
---|
DefaultContextHelperService(AuthorizedClientService<AuthorizedClient> authorizedClientService,
AuthorizationServerService<AuthorizationServer> authorizationServerService) |
Modifier and Type | Method and Description |
---|---|
protected AuthorizationServer |
getAuthorizationServer(String serverId)
Finds the
AuthorizationServer for the given server ID |
protected AuthorizationServerService<AuthorizationServer> |
getAuthorizationServerService() |
protected AuthorizedClient |
getAuthorizedClient(String clientId)
Finds the
AuthorizedClient corresponding to the given client ID |
protected AuthorizedClientService<AuthorizedClient> |
getAuthorizedClientService() |
String |
getClientId()
Get the client id from the request context
|
String |
getTenantId()
Use the client id from the request context to look up the tenant id
|
void |
setClientId(String clientId)
Set the client id on the request context
|
protected final AuthorizedClientService<AuthorizedClient> authorizedClientService
protected final AuthorizationServerService<AuthorizationServer> authorizationServerService
public DefaultContextHelperService(AuthorizedClientService<AuthorizedClient> authorizedClientService, AuthorizationServerService<AuthorizationServer> authorizationServerService)
public String getClientId()
ContextHelperService
getClientId
in interface ContextHelperService
public void setClientId(String clientId)
ContextHelperService
setClientId
in interface ContextHelperService
public String getTenantId()
ContextHelperService
getTenantId
in interface ContextHelperService
protected AuthorizedClient getAuthorizedClient(String clientId)
AuthorizedClient
corresponding to the given client IDclientId
- The client id from the web requestIllegalArgumentException
- if the client was not foundprotected AuthorizationServer getAuthorizationServer(String serverId)
AuthorizationServer
for the given server IDserverId
- the id of the authorization server to retrieveIllegalArgumentException
- if the authorization server was not foundprotected AuthorizedClientService<AuthorizedClient> getAuthorizedClientService()
protected AuthorizationServerService<AuthorizationServer> getAuthorizationServerService()
Copyright © 2021. All rights reserved.