Interface JwtSvidSource

All Known Subinterfaces:
JwtSource
All Known Implementing Classes:
CachedJwtSource, DefaultJwtSource

public interface JwtSvidSource
Represents a source of SPIFFE JWT-SVIDs.
  • Method Details

    • fetchJwtSvid

      JwtSvid fetchJwtSvid(String audience, String... extraAudiences) throws JwtSvidException
      Fetches a JWT-SVID from the source with the given audiences.
      Parameters:
      audience - the audience
      extraAudiences - a list of extra audiences as an array of String
      Returns:
      a JwtSvid
      Throws:
      JwtSvidException - when there is an error fetching the JWT SVID
    • fetchJwtSvid

      JwtSvid fetchJwtSvid(SpiffeId subject, String audience, String... extraAudiences) throws JwtSvidException
      Fetches a JWT-SVID from the source with the given subject and audiences.
      Parameters:
      subject - a SpiffeId
      audience - the audience
      extraAudiences - a list of extra audiences as an array of String
      Returns:
      a JwtSvid
      Throws:
      JwtSvidException - when there is an error fetching the JWT SVID
    • fetchJwtSvids

      List<JwtSvid> fetchJwtSvids(@NonNull @NonNull String audience, String... extraAudience) throws JwtSvidException
      Fetches all SPIFFE JWT-SVIDs on one-shot blocking call.
      Parameters:
      audience - the audience of the JWT-SVID
      extraAudience - the extra audience for the JWT_SVID
      Returns:
      all of JwtSvid object
      Throws:
      JwtSvidException - if there is an error fetching or processing the JWT from the Workload API
    • fetchJwtSvids

      List<JwtSvid> fetchJwtSvids(@NonNull @NonNull SpiffeId subject, @NonNull @NonNull String audience, String... extraAudience) throws JwtSvidException
      Fetches all SPIFFE JWT-SVIDs on one-shot blocking call.
      Parameters:
      subject - a SPIFFE ID
      audience - the audience of the JWT-SVID
      extraAudience - the extra audience for the JWT_SVID
      Returns:
      all of JwtSvid object
      Throws:
      JwtSvidException - if there is an error fetching or processing the JWT from the Workload API