Class OAuthSession

  • All Implemented Interfaces:
    Serializable

    public abstract class OAuthSession
    extends Object
    implements Serializable
    The state of the OAuth request. Verifies the validity of the response by comparing the state.
    See Also:
    Serialized Form
    • Constructor Detail

    • Method Detail

      • doCommenceLogin

        public org.kohsuke.stapler.HttpResponse doCommenceLogin​(com.google.api.client.auth.oauth2.AuthorizationCodeFlow flow)
                                                         throws IOException
        Starts the login session.
        Throws:
        IOException
      • 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

        protected String 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