Index
All Classes and Interfaces|All Packages|Serialized Form
A
- AccessToken - Class in com.janeirodigital.sai.authentication
-
General representation of an AccessToken.
- AccessToken(String) - Constructor for class com.janeirodigital.sai.authentication.AccessToken
-
Construct a new AccessToken
- AccessTokenRefresher - Class in com.janeirodigital.sai.authentication
-
Leverages the OkHttp Authenticator API to react to HTTP 401 Not Authorized responses that may arise as a result of an expired or invalid token.
- AccessTokenRefresher(AuthorizedSessionAccessor) - Constructor for class com.janeirodigital.sai.authentication.AccessTokenRefresher
-
Construct a new AccessTokenRefresher
- addRedirect(URI) - Method in class com.janeirodigital.sai.authentication.SolidOidcSession.Builder
-
Adds a redirect URI to use in the authorization request
- authenticate(Route, Response) - Method in class com.janeirodigital.sai.authentication.AccessTokenRefresher
-
In the event that a request receives a 401 Unauthorized, this method will be automatically called by the OkHttp client (if added during client initialization).
- AuthorizedSession - Interface in com.janeirodigital.sai.authentication
-
Interface implemented by different types of authorized sessions, typically different types of OAuth2/OIDC flows.
- AuthorizedSessionAccessor - Interface in com.janeirodigital.sai.authentication
-
Provides an interface for sai-java to lookup an
AuthorizedSession
based on an AccessToken or the session itself, which is necessary for applications that operate on behalf of multiple social agents. - AuthorizedSessionHelper - Class in com.janeirodigital.sai.authentication
-
Assorted helper methods related to working with OAuth2 / OpenID Connect sessions, tokens, and authorization servers.
B
- BasicAuthorizedSessionAccessor - Class in com.janeirodigital.sai.authentication
-
Basic in-memory implementation of
AuthorizedSessionAccessor
when the consumer of sai-java doesn't provide their own implementation. - BasicAuthorizedSessionAccessor() - Constructor for class com.janeirodigital.sai.authentication.BasicAuthorizedSessionAccessor
-
Initializes a new Concurrent (thread safe) Hash Map for storage and retrieval of an
AuthorizedSession
- build() - Method in class com.janeirodigital.sai.authentication.ClientCredentialsSession.Builder
-
Constructs a
ClientCredentialsSession
once all of the requisite operations have completed successfully. - build() - Method in class com.janeirodigital.sai.authentication.SolidOidcSession.Builder
-
Constructs a
SolidOidcSession
once all of the requisite operations have completed successfully. - Builder() - Constructor for class com.janeirodigital.sai.authentication.ClientCredentialsSession.Builder
- Builder() - Constructor for class com.janeirodigital.sai.authentication.SolidOidcSession.Builder
C
- ClientCredentialsSession - Class in com.janeirodigital.sai.authentication
-
Implementation of
AuthorizedSession
for a Client Credentials authorization flow - ClientCredentialsSession.Builder - Class in com.janeirodigital.sai.authentication
-
Builder for
ClientCredentialsSession
instances. - com.janeirodigital.sai.authentication - package com.janeirodigital.sai.authentication
-
Access to protected resources through supplied access tokens
D
- deleteProtectedResource(AuthorizedSession, OkHttpClient, URI) - Static method in class com.janeirodigital.sai.authentication.AuthorizedSessionHelper
-
Calls
AuthorizedSessionHelper.deleteProtectedResource(AuthorizedSession, OkHttpClient, URI, Headers)
with no additional headers provided. - deleteProtectedResource(AuthorizedSession, OkHttpClient, URI, Headers) - Static method in class com.janeirodigital.sai.authentication.AuthorizedSessionHelper
-
Deletes a protected resource that requires additional Authorization headers to be added to the request.
G
- generateId(String, URI, URI, URI) - Static method in interface com.janeirodigital.sai.authentication.AuthorizedSession
-
Default method that returns a consistent session identifier across implementations for an authorized session scoped to the social agent, application id, and openid provider.
- get(AccessToken) - Method in interface com.janeirodigital.sai.authentication.AuthorizedSessionAccessor
-
Get an
AuthorizedSession
based on the value of anAccessToken
- get(AccessToken) - Method in class com.janeirodigital.sai.authentication.BasicAuthorizedSessionAccessor
-
Searches the in-memory session store for an
AuthorizedSession
with the same access token value as the one in the providedaccessToken
. - get(AuthorizedSession) - Method in interface com.janeirodigital.sai.authentication.AuthorizedSessionAccessor
-
Get the provided
AuthorizedSession
- get(AuthorizedSession) - Method in class com.janeirodigital.sai.authentication.BasicAuthorizedSessionAccessor
-
Gets the provided
AuthorizedSession
from the in-memory store - get(URI, URI, URI) - Method in interface com.janeirodigital.sai.authentication.AuthorizedSessionAccessor
- get(URI, URI, URI) - Method in class com.janeirodigital.sai.authentication.BasicAuthorizedSessionAccessor
- getAccessToken() - Method in interface com.janeirodigital.sai.authentication.AuthorizedSession
-
Gets the
AccessToken
associated with theAuthorizedSession
- getAccessTokenFromRequest(Request) - Static method in class com.janeirodigital.sai.authentication.AuthorizedSessionHelper
-
Extracts the value of an access token from the Authorization header of an HTTP request.
- getApplicationId() - Method in interface com.janeirodigital.sai.authentication.AuthorizedSession
-
Gets the URI of the Application identity associated with the
AuthorizedSession
- getClientIdDocument(OkHttpClient, URI) - Static method in class com.janeirodigital.sai.authentication.AuthorizedSessionHelper
-
Get the client identifier document as a Jena Resource associated with the provided
clientId
- getCodeRequestUri() - Method in class com.janeirodigital.sai.authentication.SolidOidcSession.Builder
-
Returns the prepared authorization code request URI
- getDPoPProofFactory(ECKey) - Static method in class com.janeirodigital.sai.authentication.SolidOidcSession
-
Gets a DPoP proof factory that can be used for generate DPoP proofs for requests made by the session.
- getEllipticCurveKey(Curve) - Static method in class com.janeirodigital.sai.authentication.SolidOidcSession
- getId(String) - Method in interface com.janeirodigital.sai.authentication.AuthorizedSession
- getOidcIssuerForSocialAgent(OkHttpClient, URI) - Static method in class com.janeirodigital.sai.authentication.AuthorizedSessionHelper
- getOIDCProviderConfiguration(URI) - Static method in class com.janeirodigital.sai.authentication.AuthorizedSessionHelper
-
Get the configuration of an OpenID Provider based on the discovery and contents of its .well-known/openid-configuration resource.
- getOidcProviderId() - Method in interface com.janeirodigital.sai.authentication.AuthorizedSession
-
Gets the URI of the OIDC Provider that issued the tokens for the
AuthorizedSession
- getProof(DPoPProofFactory, HttpMethod, URI) - Static method in class com.janeirodigital.sai.authentication.SolidOidcSession
-
Gets the required DPoP proof that must be created for each request based on the
method
and targeturi
. - getProtectedRdfResource(AuthorizedSession, OkHttpClient, URI) - Static method in class com.janeirodigital.sai.authentication.AuthorizedSessionHelper
-
Calls
AuthorizedSessionHelper.getProtectedRdfResource(AuthorizedSession, OkHttpClient, URI, Headers)
with no additional headers provided. - getProtectedRdfResource(AuthorizedSession, OkHttpClient, URI, Headers) - Static method in class com.janeirodigital.sai.authentication.AuthorizedSessionHelper
-
Gets a protected RDF resource that requires additional Authorization headers to be added to the request.
- getProtectedResource(AuthorizedSession, OkHttpClient, URI) - Static method in class com.janeirodigital.sai.authentication.AuthorizedSessionHelper
-
Calls
AuthorizedSessionHelper.getProtectedResource(AuthorizedSession, OkHttpClient, URI, Headers)
with no additional headers provided. - getProtectedResource(AuthorizedSession, OkHttpClient, URI, Headers) - Static method in class com.janeirodigital.sai.authentication.AuthorizedSessionHelper
-
Gets a protected resource that requires additional Authorization headers to be added to the request.
- getRefreshToken() - Method in interface com.janeirodigital.sai.authentication.AuthorizedSession
-
Gets the
RefreshToken
associated with theAuthorizedSession
- getRefreshToken() - Method in class com.janeirodigital.sai.authentication.ClientCredentialsSession
-
The client credentials flows don't require refresh tokens
- getSocialAgentId() - Method in interface com.janeirodigital.sai.authentication.AuthorizedSession
-
Gets the URI of the SocialAgent identity associated with the
AuthorizedSession
N
- NAMESPACE - Static variable in class com.janeirodigital.sai.authentication.SolidOidcVocabulary
- NAMESPACE - Static variable in class com.janeirodigital.sai.authentication.SolidTermsVocabulary
O
- obtainToken(String, String, URI, Scope) - Static method in class com.janeirodigital.sai.authentication.ClientCredentialsSession
-
POSTs a token request to the token endpoint of the oidcProvider using the provided
clientIdentifier
andclientSecret
to authenticate and request the providedscope
. - obtainTokens(URI, ClientID, AuthorizationGrant, DPoPProofFactory) - Static method in class com.janeirodigital.sai.authentication.SolidOidcSession
-
Post a token request to the token endpoint provided in
oidcProviderMetadata
.
P
- prepareCodeRequest() - Method in class com.janeirodigital.sai.authentication.SolidOidcSession.Builder
-
Prepares an Authorization Code Request which should be provided to the Social Agent for review in-browser
- processCodeResponse(URI) - Method in class com.janeirodigital.sai.authentication.SolidOidcSession.Builder
-
Process the response to the authorization code request.
- putProtectedRdfResource(AuthorizedSession, OkHttpClient, URI, Resource, ContentType) - Static method in class com.janeirodigital.sai.authentication.AuthorizedSessionHelper
-
Calls
AuthorizedSessionHelper.putProtectedRdfResource(AuthorizedSession, OkHttpClient, URI, Resource, ContentType, String, Headers)
with no additional headers provided. - putProtectedRdfResource(AuthorizedSession, OkHttpClient, URI, Resource, ContentType, String) - Static method in class com.janeirodigital.sai.authentication.AuthorizedSessionHelper
-
Calls
AuthorizedSessionHelper.putProtectedRdfResource(AuthorizedSession, OkHttpClient, URI, Resource, ContentType, String, Headers)
with additional headers provided - putProtectedRdfResource(AuthorizedSession, OkHttpClient, URI, Resource, ContentType, String, Headers) - Static method in class com.janeirodigital.sai.authentication.AuthorizedSessionHelper
-
Puts a protected RDF resource that requires additional Authorization headers to be added to the request.
- putProtectedRdfResource(AuthorizedSession, OkHttpClient, URI, Resource, ContentType, Headers) - Static method in class com.janeirodigital.sai.authentication.AuthorizedSessionHelper
-
Calls
AuthorizedSessionHelper.putProtectedRdfResource(AuthorizedSession, OkHttpClient, URI, Resource, ContentType, String, Headers)
with additional headers provided
R
- refresh() - Method in interface com.janeirodigital.sai.authentication.AuthorizedSession
-
Refreshes the token(s) associated with the
AuthorizedSession
- refresh() - Method in class com.janeirodigital.sai.authentication.ClientCredentialsSession
-
"Refreshes" the session via another client credentials token request.
- refresh() - Method in class com.janeirodigital.sai.authentication.SolidOidcSession
-
Refreshes the tokens associated with the session.
- refresh(AuthorizedSession) - Method in interface com.janeirodigital.sai.authentication.AuthorizedSessionAccessor
-
Refreshes and updates the stored version of the
AuthorizedSession
- refresh(AuthorizedSession) - Method in class com.janeirodigital.sai.authentication.BasicAuthorizedSessionAccessor
-
Refreshes the
AuthorizedSession
and updates the in-memory session store with the new values - RefreshToken - Class in com.janeirodigital.sai.authentication
-
General representation of a RefreshToken.
- RefreshToken(String) - Constructor for class com.janeirodigital.sai.authentication.RefreshToken
-
Construct a new RefreshToken
- replaceAuthorizationHeaders(Response, AuthorizedSession) - Method in class com.janeirodigital.sai.authentication.AccessTokenRefresher
-
Removes any existing authorization headers from the request and adds the updated ones.
- requestToken() - Method in class com.janeirodigital.sai.authentication.ClientCredentialsSession.Builder
-
Request tokens from the token endpoint of the openid connect provider
- requestTokens() - Method in class com.janeirodigital.sai.authentication.SolidOidcSession.Builder
-
Request tokens from the token endpoint of the openid connect provider
S
- SaiAuthenticationException - Exception in com.janeirodigital.sai.authentication
-
General exception used to represent issues with authentication processing
- SaiAuthenticationException(String) - Constructor for exception com.janeirodigital.sai.authentication.SaiAuthenticationException
- SaiAuthenticationException(String, Throwable) - Constructor for exception com.janeirodigital.sai.authentication.SaiAuthenticationException
- setApplication(URI) - Method in class com.janeirodigital.sai.authentication.ClientCredentialsSession.Builder
-
Optional - Sets the application identifier associated with the registered client.
- setApplication(URI) - Method in class com.janeirodigital.sai.authentication.SolidOidcSession.Builder
-
Sets the client Application that will use the Solid-OIDC session.
- setApplication(URI, boolean) - Method in class com.janeirodigital.sai.authentication.SolidOidcSession.Builder
-
Sets the client application identifier for the Solid-OIDC session, with the ability to lookup the client document and extract additional criteria (redirect uris and scope) for the session automatically (which can be disabled by setting
manual
to false). - setAuthorizationHeaders(AuthorizedSession, HttpMethod, URI, Headers) - Static method in class com.janeirodigital.sai.authentication.AuthorizedSessionHelper
-
Sets the appropriate HTTP Authorization headers based on the characteristics of the
AuthorizedSession
. - setClientIdentifier(String) - Method in class com.janeirodigital.sai.authentication.ClientCredentialsSession.Builder
-
Sets the client identifier that will be used to authenticate with the oidc provider.
- setClientSecret(String) - Method in class com.janeirodigital.sai.authentication.ClientCredentialsSession.Builder
-
Sets the client secret that will be used to authenticate with the oidc provider.
- setHttpClient(OkHttpClient) - Method in class com.janeirodigital.sai.authentication.SolidOidcSession.Builder
-
Sets an http client that can be used for various operations when building a Solid OIDC session
- setOidcProvider(URI) - Method in class com.janeirodigital.sai.authentication.ClientCredentialsSession.Builder
-
Sets the openid connect provider that the client is registered with.
- setPrompt(Prompt) - Method in class com.janeirodigital.sai.authentication.SolidOidcSession.Builder
-
Sets the prompt to use in the authorization request
- setRedirects(List<URI>) - Method in class com.janeirodigital.sai.authentication.SolidOidcSession.Builder
-
Sets the list of redirect URIs to use in the authorization request
- setScope(List<String>) - Method in class com.janeirodigital.sai.authentication.ClientCredentialsSession.Builder
-
Sets the authorization scopes to use in the authorization request
- setScope(List<String>) - Method in class com.janeirodigital.sai.authentication.SolidOidcSession.Builder
-
Sets the authorization scopes to use in the authorization request
- setSocialAgent(URI) - Method in class com.janeirodigital.sai.authentication.ClientCredentialsSession.Builder
-
Optional - Sets the social agent associated with the registered client.
- setSocialAgent(URI) - Method in class com.janeirodigital.sai.authentication.SolidOidcSession.Builder
-
Sets the Social Agent that the Solid-OIDC session will be established on behalf of.
- size() - Method in class com.janeirodigital.sai.authentication.BasicAuthorizedSessionAccessor
-
Returns the size of the in-memory session store
- SOLID_OIDC_APPLICATION_TYPE - Static variable in class com.janeirodigital.sai.authentication.SolidOidcVocabulary
- SOLID_OIDC_CLIENT_ID - Static variable in class com.janeirodigital.sai.authentication.SolidOidcVocabulary
- SOLID_OIDC_CLIENT_NAME - Static variable in class com.janeirodigital.sai.authentication.SolidOidcVocabulary
- SOLID_OIDC_CLIENT_URI - Static variable in class com.janeirodigital.sai.authentication.SolidOidcVocabulary
- SOLID_OIDC_CONTACTS - Static variable in class com.janeirodigital.sai.authentication.SolidOidcVocabulary
- SOLID_OIDC_DEFAULT_MAX_AGE - Static variable in class com.janeirodigital.sai.authentication.SolidOidcVocabulary
- SOLID_OIDC_GRANT_TYPES - Static variable in class com.janeirodigital.sai.authentication.SolidOidcVocabulary
- SOLID_OIDC_ISSUER - Static variable in class com.janeirodigital.sai.authentication.SolidTermsVocabulary
- SOLID_OIDC_LOGO_URI - Static variable in class com.janeirodigital.sai.authentication.SolidOidcVocabulary
- SOLID_OIDC_POLICY_URI - Static variable in class com.janeirodigital.sai.authentication.SolidOidcVocabulary
- SOLID_OIDC_REDIRECT_URIS - Static variable in class com.janeirodigital.sai.authentication.SolidOidcVocabulary
- SOLID_OIDC_REQUIRE_AUTH_TIME - Static variable in class com.janeirodigital.sai.authentication.SolidOidcVocabulary
- SOLID_OIDC_RESPONSE_TYPES - Static variable in class com.janeirodigital.sai.authentication.SolidOidcVocabulary
- SOLID_OIDC_SCOPE - Static variable in class com.janeirodigital.sai.authentication.SolidOidcVocabulary
- SOLID_OIDC_TOKEN_ENDPOINT_AUTH - Static variable in class com.janeirodigital.sai.authentication.SolidOidcVocabulary
- SOLID_OIDC_TOS_URI - Static variable in class com.janeirodigital.sai.authentication.SolidOidcVocabulary
- SolidOidcSession - Class in com.janeirodigital.sai.authentication
-
Implementation of
AuthorizedSession
for Solid-OIDC. - SolidOidcSession(SolidOidcSession.Builder) - Constructor for class com.janeirodigital.sai.authentication.SolidOidcSession
- SolidOidcSession.Builder - Class in com.janeirodigital.sai.authentication
-
Builder for
SolidOidcSession
instances. - SolidOidcVocabulary - Class in com.janeirodigital.sai.authentication
-
Properties and classes of the Solid OIDC vocabulary
- SolidTermsVocabulary - Class in com.janeirodigital.sai.authentication
-
Properties and classes of the Solid Terms vocabulary
- store(AuthorizedSession) - Method in class com.janeirodigital.sai.authentication.BasicAuthorizedSessionAccessor
-
Updates in-memory session store with the provided
AuthorizedSession
T
- toHttpHeaders(HttpMethod, URI) - Method in interface com.janeirodigital.sai.authentication.AuthorizedSession
-
Generates a map of HTTP authorization headers that can be added to an HTTP request when accessing protected resources.
- toHttpHeaders(HttpMethod, URI) - Method in class com.janeirodigital.sai.authentication.ClientCredentialsSession
-
Generates a map of HTTP Authorization headers that can be use to make authorized requests using the session.
- toHttpHeaders(HttpMethod, URI) - Method in class com.janeirodigital.sai.authentication.SolidOidcSession
-
Generates a map of HTTP Authorization headers that can be use to make authorized requests using the session.
- translateAccessToken(AccessToken) - Static method in class com.janeirodigital.sai.authentication.AuthorizedSessionHelper
-
Translates a nimbus native AccessToken into the generic sai-java format
- translateRefreshToken(RefreshToken) - Static method in class com.janeirodigital.sai.authentication.AuthorizedSessionHelper
-
Translates a nimbus native AccessToken into the generic sai-java format
V
- value - Variable in class com.janeirodigital.sai.authentication.AccessToken
- value - Variable in class com.janeirodigital.sai.authentication.RefreshToken
All Classes and Interfaces|All Packages|Serialized Form