Class OAuthSession
java.lang.Object
org.openshift.jenkins.plugins.openshiftlogin.OAuthSession
- All Implemented Interfaces:
Serializable
- Direct Known Subclasses:
BearerTokenOAuthSession
The state of the OAuth request.
Verifies the validity of the response by comparing the state.
- See Also:
-
Constructor Summary
ConstructorsConstructorDescriptionOAuthSession(com.google.api.client.auth.oauth2.AuthorizationCodeFlow flow, String from, String redirectUrl) -
Method Summary
Modifier and TypeMethodDescriptionorg.kohsuke.stapler.HttpResponseStarts the login session.org.kohsuke.stapler.HttpResponsedoFinishLogin(org.kohsuke.stapler.StaplerRequest request) When the identity provider is done with its thing, the user comes back here.protected org.kohsuke.stapler.HttpResponsecom.google.api.client.auth.oauth2.Credentialstatic OAuthSessionGets theOAuthSessionassociated with HTTP session in the current extend.protected StringgetFrom()Where was the user trying to navigate to when they had to login?protected abstract org.kohsuke.stapler.HttpResponsevoidsetCredential(com.google.api.client.auth.oauth2.Credential cred)
-
Constructor Details
-
OAuthSession
-
-
Method Details
-
getCredential
public com.google.api.client.auth.oauth2.Credential getCredential() -
setCredential
public void setCredential(com.google.api.client.auth.oauth2.Credential cred) -
doCommenceLogin
Starts the login session.- Throws:
IOException
-
doRequestAuthorizationCode
protected org.kohsuke.stapler.HttpResponse doRequestAuthorizationCode() -
doFinishLogin
public org.kohsuke.stapler.HttpResponse doFinishLogin(org.kohsuke.stapler.StaplerRequest request) throws IOException When the identity provider is done with its thing, the user comes back here.- Throws:
IOException
-
getFrom
Where was the user trying to navigate to when they had to login?- Returns:
- the url the user wants to reach
-
onSuccess
protected abstract org.kohsuke.stapler.HttpResponse onSuccess(String authorizationCode) throws IOException - Throws:
IOException
-
getCurrent
Gets theOAuthSessionassociated with HTTP session in the current extend.
-