Class JwtBundleSet
java.lang.Object
io.spiffe.bundle.jwtbundle.JwtBundleSet
- All Implemented Interfaces:
BundleSource<JwtBundle>
Represents a set of JWT bundles keyed by trust domain.
-
Method Summary
Modifier and TypeMethodDescriptionstatic JwtBundleSetemptySet()Creates a JWT bundle set empty.getBundleForTrustDomain(@NonNull TrustDomain trustDomain) Gets the JWT bundle associated to a trust domain.Returns the map of JWT bundles keyed by trust domain.static JwtBundleSetof(@NonNull Collection<JwtBundle> bundles) Creates a JWT bundle set from the list of JWT bundles.voidAdds JWT bundle to this set, if the trust domain already exists replace the bundle.
-
Method Details
-
of
Creates a JWT bundle set from the list of JWT bundles.- Parameters:
bundles- Collection ofJwtBundle- Returns:
- a
JwtBundleSet
-
emptySet
-
getBundleForTrustDomain
public JwtBundle getBundleForTrustDomain(@NonNull @NonNull TrustDomain trustDomain) throws BundleNotFoundException Gets the JWT bundle associated to a trust domain.- Specified by:
getBundleForTrustDomainin interfaceBundleSource<JwtBundle>- Parameters:
trustDomain- an instance of aTrustDomain- Returns:
- a
JwtBundleassociated to the given trust domain - Throws:
BundleNotFoundException- if no bundle could be found for the given trust domain
-
getBundles
Returns the map of JWT bundles keyed by trust domain.- Returns:
- the map of JWT bundles keyed by trust domain
-
put
Adds JWT bundle to this set, if the trust domain already exists replace the bundle.- Parameters:
jwtBundle- an instance of a JwtBundle.
-