Class Credential

java.lang.Object
com.inrupt.client.auth.Credential

public class Credential extends Object
A credential that can be used with Solid resource servers.
  • Constructor Details

    • Credential

      public Credential(String scheme, URI issuer, String token, Instant expiration, URI principal, String jkt)
      Create a credential.
      Parameters:
      scheme - the scheme
      issuer - the issuer
      token - the token
      expiration - the time after which the credential is no longer valid
      principal - the identifier for the principal, may be null
      jkt - the json key thumbprint, may be null
  • Method Details

    • getScheme

      public String getScheme()
      Get the scheme for this credential.
      Returns:
      the scheme
    • getPrincipal

      public Optional<URI> getPrincipal()
      Get the principal, if available.
      Returns:
      the principal
    • getIssuer

      public URI getIssuer()
      Get the issuer for this credential.
      Returns:
      the issuer
    • getToken

      public String getToken()
      Get the token for this credential.
      Returns:
      the raw token
    • getExpiration

      public Instant getExpiration()
      Get the expiration time for this credential.
      Returns:
      the expiration time
    • getProofThumbprint

      public Optional<String> getProofThumbprint()
      Get the thumbprint for an associated proof, if present.
      Returns:
      the proof thumbprint