soteria
soteria copied to clipboard
Split SubjectParser code in Application server specific classes
The SubjectParser contains package names for different servers within Strings.
This leads to some unmaintainable code.
Proposal (see also https://github.com/javaee-security-spec/soteria/issues/69#issuecomment-308394262) is to create separate maven artifacts with the application server specific code.
Proposal
- Interface with methods to retrieve caller and groups (getGroupsFromPrincipals, getCallerPrincipalFromPrincipals, ...)
- Server specific project contains an implementation of the interface which is defined as CDI bean. CdiUtils#getBeanReference(java.lang.Class<T>, java.lang.annotation.Annotation...) can be used then to retrieve the implementation.