Class TrustDomain
java.lang.Object
io.spiffe.spiffeid.TrustDomain
Represents the name of a SPIFFE trust domain (e.g. 'domain.test').
-
Method Summary
Modifier and TypeMethodDescriptionnewSpiffeId(String... segments) Creates a SPIFFE ID from this trust domain and the given path segments.static TrustDomainCreates a trust domain.Returns the trust domain as SPIFFE ID string (e.g.toString()Returns the trust domain as a String.
-
Method Details
-
parse
Creates a trust domain.- Parameters:
idOrName- the name of a Trust Domain or a string representing a SpiffeId.- Returns:
- an instance of a
TrustDomain - Throws:
IllegalArgumentException- if the given string is empty.InvalidSpiffeIdException- if the given string contains an invalid char.
-
newSpiffeId
Creates a SPIFFE ID from this trust domain and the given path segments.- Parameters:
segments- path segments- Returns:
- a
SpiffeIdwith the current trust domain and the given path segments - Throws:
InvalidSpiffeIdException- if the given path segments contain invalid chars or empty or dot segments
-
toString
-
toIdString
Returns the trust domain as SPIFFE ID string (e.g. 'spiffe://example.org')- Returns:
- a String formatted as a SPIFFE ID
-