Package com.inrupt.client.openid
Class OpenIdProvider
- java.lang.Object
-
- com.inrupt.client.openid.OpenIdProvider
-
public class OpenIdProvider extends Object
A class for interacting with an OpenID Provider.- See Also:
- OpenID Connect 1.0
-
-
Constructor Summary
Constructors Constructor Description OpenIdProvider(URI issuer, DPoP dpop)
Create an OpenID Provider client.OpenIdProvider(URI issuer, DPoP dpop, HttpService httpClient)
Create an OpenID Provider client.OpenIdProvider(URI issuer, DPoP dpop, HttpService httpClient, ClientCache<URI,Metadata> metadataCache)
Create an OpenID Provider client.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description CompletionStage<URI>
authorize(AuthorizationRequest request)
Construct the OpenID authorization URI asynchronously.CompletionStage<URI>
endSession(EndSessionRequest request)
End the session asynchronously with the OpenID Provider.CompletionStage<Metadata>
metadata()
Fetch the OpenID metadata resource.CompletionStage<TokenResponse>
token(TokenRequest request)
Interact asynchronously with the OpenID Provider's token endpoint.
-
-
-
Constructor Detail
-
OpenIdProvider
public OpenIdProvider(URI issuer, DPoP dpop)
Create an OpenID Provider client.- Parameters:
issuer
- the OpenID provider issuerdpop
- the DPoP manager
-
OpenIdProvider
public OpenIdProvider(URI issuer, DPoP dpop, HttpService httpClient)
Create an OpenID Provider client.- Parameters:
issuer
- the OpenID provider issuerdpop
- the DPoP managerhttpClient
- an HTTP client
-
OpenIdProvider
public OpenIdProvider(URI issuer, DPoP dpop, HttpService httpClient, ClientCache<URI,Metadata> metadataCache)
Create an OpenID Provider client.- Parameters:
issuer
- the OpenID provider issuerdpop
- the DPoP managerhttpClient
- an HTTP clientmetadataCache
- an OpenID Metadata cache
-
-
Method Detail
-
metadata
public CompletionStage<Metadata> metadata()
Fetch the OpenID metadata resource.- Returns:
- the next stage of completion, containing the OpenID Provider's metadata resource
-
authorize
public CompletionStage<URI> authorize(AuthorizationRequest request)
Construct the OpenID authorization URI asynchronously.- Parameters:
request
- the authorization request- Returns:
- the next stage of completion, containing URI for performing the authorization request
-
token
public CompletionStage<TokenResponse> token(TokenRequest request)
Interact asynchronously with the OpenID Provider's token endpoint.- Parameters:
request
- the token request- Returns:
- the next stage of completion, containing the token response
-
endSession
public CompletionStage<URI> endSession(EndSessionRequest request)
End the session asynchronously with the OpenID Provider.- Parameters:
request
- the end session request- Returns:
- a URI to which the app should be redirected, may be
null
if RP-initiated logout is not supported
-
-