Package com.inrupt.client.auth
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.
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Instant
getExpiration()
Get the expiration time for this credential.URI
getIssuer()
Get the issuer for this credential.Optional<URI>
getPrincipal()
Get the principal, if available.Optional<String>
getProofThumbprint()
Get the thumbprint for an associated proof, if present.String
getScheme()
Get the scheme for this credential.String
getToken()
Get the token for this credential.
-
-
-
Constructor Detail
-
Credential
public Credential(String scheme, URI issuer, String token, Instant expiration, URI principal, String jkt)
Create a credential.- Parameters:
scheme
- the schemeissuer
- the issuertoken
- the tokenexpiration
- the time after which the credential is no longer validprincipal
- the identifier for the principal, may benull
jkt
- the json key thumbprint, may benull
-
-
Method Detail
-
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
-
-