Class OpenIdSession
java.lang.Object
hudson.plugins.openid.OpenIdSession
Represents state for an OpenID authentication.
- Author:
- Kohsuke Kawaguchi
-
Constructor Summary
ConstructorsConstructorDescriptionOpenIdSession(org.openid4java.consumer.ConsumerManager manager, String openid, String finishUrl) OpenIdSession(org.openid4java.consumer.ConsumerManager manager, org.openid4java.discovery.DiscoveryInformation endpoint, String finishUrl) -
Method Summary
Modifier and TypeMethodDescriptionorg.kohsuke.stapler.HttpResponseStarts the login session.org.kohsuke.stapler.HttpResponsedoFinishLogin(org.kohsuke.stapler.StaplerRequest2 request) When the identity provider is done with its thing, the user comes back here.static OpenIdSessionGets theOpenIdSessionassociated with HTTP session in the current extend.getFrom()protected abstract org.kohsuke.stapler.HttpResponsevoidprotected booleanWhether the HTTP session must be renewed when the flow starts.
-
Constructor Details
-
OpenIdSession
public OpenIdSession(org.openid4java.consumer.ConsumerManager manager, org.openid4java.discovery.DiscoveryInformation endpoint, String finishUrl) -
OpenIdSession
-
-
Method Details
-
setFrom
-
getFrom
-
doCommenceLogin
public org.kohsuke.stapler.HttpResponse doCommenceLogin() throws IOException, org.openid4java.OpenIDExceptionStarts the login session.- Throws:
IOExceptionorg.openid4java.OpenIDException
-
shouldInvalidateSession
protected boolean shouldInvalidateSession()Whether the HTTP session must be renewed when the flow starts.Login flows must rotate the session to prevent session fixation (CVE-2023-24444). Flows that run for an already authenticated user, such as associating an OpenID with the current account, must keep the session and its authentication state.
-
doFinishLogin
public org.kohsuke.stapler.HttpResponse doFinishLogin(org.kohsuke.stapler.StaplerRequest2 request) throws IOException, org.openid4java.OpenIDException When the identity provider is done with its thing, the user comes back here.- Throws:
IOExceptionorg.openid4java.OpenIDException
-
onSuccess
- Throws:
IOException
-
getCurrent
Gets theOpenIdSessionassociated with HTTP session in the current extend.
-