Class AuthenticationVendorPrivilegesSummary
Authentication
that are
interesting for vendor-discrimination behavior.- See Also:
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionprotected boolean
boolean
This is expected to be a comprehensive set of all authorities that the authentication has been granted, including any authorities that were restricted to certain restriction targets.The set of allvendor-type
restriction targets that the authentication has.A map from"restricted authorities"
(ex: READ_PRODUCT) to all "vendor refs" (ex: a vendor ID or vendor code) that the authority has been granted to.int
hashCode()
boolean
Whether or not the authentication has restrictions of any type (not just vendor).void
setAllAuthorities
(Set<String> allAuthorities) This is expected to be a comprehensive set of all authorities that the authentication has been granted, including any authorities that were restricted to certain restriction targets.void
setRestrictedVendorRefs
(Set<String> restrictedVendorRefs) The set of allvendor-type
restriction targets that the authentication has.void
setUnrestricted
(boolean unrestricted) Whether or not the authentication has restrictions of any type (not just vendor).void
setVendorRefsByRestrictedAuthority
(Map<String, Set<String>> vendorRefsByRestrictedAuthority) A map from"restricted authorities"
(ex: READ_PRODUCT) to all "vendor refs" (ex: a vendor ID or vendor code) that the authority has been granted to.toString()
-
Constructor Details
-
AuthenticationVendorPrivilegesSummary
public AuthenticationVendorPrivilegesSummary()
-
-
Method Details
-
isUnrestricted
public boolean isUnrestricted()Whether or not the authentication has restrictions of any type (not just vendor). This is important, since it allows distinction between the scenario where an authentication is unrestricted vs when an authentication is restricted but doesn't have any vendor-type restrictions (in which case they cannot access any vendors). -
getAllAuthorities
This is expected to be a comprehensive set of all authorities that the authentication has been granted, including any authorities that were restricted to certain restriction targets. In other words, if the authentication was granted an authority anywhere, within restriction(s) or otherwise, it should appear in this set.This can be useful, since some policy validations are only concerned about whether an authority has been granted in any capacity to the authentication rather than the specifics of which restriction(s) it might be granted in.
-
getRestrictedVendorRefs
The set of allvendor-type
restriction targets that the authentication has. Values are "vendor refs" (ex: a vendor ID or vendor code) that the authentication is restricted to.Note that the value of
isUnrestricted()
is important to understanding the value of this field. If an authentication is unrestricted, the value of this field should essentially be ignored, since the authentication should be able to access any vendor. However, if the authentication is restricted, then an empty set here means the authentication cannot access any vendor (this can happen if the authentication has restrictions, but none of them are vendor-type). -
getVendorRefsByRestrictedAuthority
A map from"restricted authorities"
(ex: READ_PRODUCT) to all "vendor refs" (ex: a vendor ID or vendor code) that the authority has been granted to. -
setUnrestricted
public void setUnrestricted(boolean unrestricted) Whether or not the authentication has restrictions of any type (not just vendor). This is important, since it allows distinction between the scenario where an authentication is unrestricted vs when an authentication is restricted but doesn't have any vendor-type restrictions (in which case they cannot access any vendors). -
setAllAuthorities
This is expected to be a comprehensive set of all authorities that the authentication has been granted, including any authorities that were restricted to certain restriction targets. In other words, if the authentication was granted an authority anywhere, within restriction(s) or otherwise, it should appear in this set.This can be useful, since some policy validations are only concerned about whether an authority has been granted in any capacity to the authentication rather than the specifics of which restriction(s) it might be granted in.
-
setRestrictedVendorRefs
The set of allvendor-type
restriction targets that the authentication has. Values are "vendor refs" (ex: a vendor ID or vendor code) that the authentication is restricted to.Note that the value of
isUnrestricted()
is important to understanding the value of this field. If an authentication is unrestricted, the value of this field should essentially be ignored, since the authentication should be able to access any vendor. However, if the authentication is restricted, then an empty set here means the authentication cannot access any vendor (this can happen if the authentication has restrictions, but none of them are vendor-type). -
setVendorRefsByRestrictedAuthority
public void setVendorRefsByRestrictedAuthority(Map<String, Set<String>> vendorRefsByRestrictedAuthority) A map from"restricted authorities"
(ex: READ_PRODUCT) to all "vendor refs" (ex: a vendor ID or vendor code) that the authority has been granted to. -
equals
-
canEqual
-
hashCode
public int hashCode() -
toString
-