[OPENAM-16775] Public API access to org.forgerock.openam.core.realms.Realms method(s) Created: 10/Sep/20 Updated: 14/Sep/20 Resolved: 14/Sep/20 |
|
Status: | Closed |
Project: | OpenAM |
Component/s: | API descriptor |
Affects Version/s: | 6.5.2.3 |
Fix Version/s: | None |
Type: | Improvement | Priority: | Minor |
Reporter: | Anastasios Kampas | Assignee: | Unassigned |
Resolution: | Won't Do | Votes: | 0 |
Labels: | None | ||
Remaining Estimate: | Not Specified | ||
Time Spent: | Not Specified | ||
Original Estimate: | Not Specified |
Rank: | 1|i0230v: |
Support Ticket IDs: |
Description |
Specifically the #of method: returns the realm in Realm type, instead of a String. This is needed when trying to use annotated service but the calling service doesn't support injection. For example, PAP doesn't support injection. If it needs to access an annotated service, then it needs to call the #getRealmSingleton method:
getRealmSingleton(Class<T> serviceInterface, Realm realm)
So, one can use String realm = DNMapper.orgNameToRealmName(ssoToken.getProperty("Organization")); and then use Realms.of(realm) to get the realm in Realm type.
The workaround is to create a global service and then use #getGlobalSingleton where Realm is not required, but global service is not always an accepted solution. It's quite unlikely to update PAP to support injection, so making the #of method would be useful. |
Comments |
Comment by Andy Hall [ 14/Sep/20 ] |
Effort should be focussed in OPENAM-14814 |