i have application needs pull tenant information on per method basis. using cloud foundry's uaa server authentication , authorization needs. have tried access tenant information doing following:
@requestmapping("/") @preauthorize("#oauth2.hasscope('project.retrieveitems')") public list<itemdto> retrieveall(oauth2authentication token) { ... code here retrieve identity zone , use filter results. }
the oauth2authentication object doesn't have information tenant, scopes , authorizations. there anyway information method?
thanks assistance.
identityzoneholder.get()
will return current tenant being accessed within uaa (if you're coding within uaa itself)
but take asking application, core spring security oauth2 implementation has no idea tenants
it has awareness of token url , check token url.
Comments
Post a Comment