Package com.inrupt.client.openid
Class OpenIdConfig
java.lang.Object
com.inrupt.client.openid.OpenIdConfig
A class for configuring an Open ID session.
This includes verification rules for OpenID Connect ID Tokens.
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionvoid
addProofKeyPair
(String algorithm, KeyPair keypair) Add a Proofing (DPoP) keypair.Get the expected audience of an ID token.int
Get the expiration grace period for an ID token in seconds.Get any externally-defined Proofing (DPoP) keypairs.Get the public signing key location of an ID token.Get any OAuth 2.0 scope values.void
setExpectedAudience
(String audience) Set the expected audience of an ID token.void
setExpGracePeriodSecs
(int graceSecs) Set an expiration grace period for an ID token in seconds.void
setProofKeyPairs
(Map<String, KeyPair> keypairs) Set any externally-defined Proofing (DPoP) keypairs.void
setPublicKeyLocation
(URI publicKeyLocation) Set the public signing key location of an ID token.void
Set any OAuth 2.0 scope values.
-
Constructor Details
-
OpenIdConfig
public OpenIdConfig()
-
-
Method Details
-
getExpGracePeriodSecs
public int getExpGracePeriodSecs()Get the expiration grace period for an ID token in seconds.- Returns:
- the expiration grace period, default is 60.
-
setExpGracePeriodSecs
public void setExpGracePeriodSecs(int graceSecs) Set an expiration grace period for an ID token in seconds.- Parameters:
graceSecs
- the expiration grace period
-
getExpectedAudience
Get the expected audience of an ID token.- Returns:
- the expected audience, default is
null
-
setExpectedAudience
Set the expected audience of an ID token.- Parameters:
audience
- the expected audience
-
getPublicKeyLocation
Get the public signing key location of an ID token.If the public signing key is
null
, the ID Token signature is not verified- Returns:
- the public key location, default is
null
-
setPublicKeyLocation
Set the public signing key location of an ID token.If the public signing key location is
null
, the ID Token signature is not verified- Parameters:
publicKeyLocation
- the public signing key location
-
setProofKeyPairs
Set any externally-defined Proofing (DPoP) keypairs.Note: this will remove any previously set keypairs
- Parameters:
keypairs
- the keypair
-
addProofKeyPair
Add a Proofing (DPoP) keypair.- Parameters:
algorithm
- the algorithmkeypair
- the keypair
-
getProofKeyPairs
Get any externally-defined Proofing (DPoP) keypairs.- Returns:
- the keypairs
-
setScopes
Set any OAuth 2.0 scope values.Note: by default, the scopes are "webid" and "openid". Setting new values will clear any existing values.
- Parameters:
scopes
- the scope values
-
getScopes
Get any OAuth 2.0 scope values.- Returns:
- the scope values
-