[jbosstools-issues] [JBoss JIRA] (JBIDE-19829) Add Oauth support to the Openshift Connection Wizard

Andre Dietisheim (JIRA) issues at jboss.org
Fri May 29 17:01:02 EDT 2015


    [ https://issues.jboss.org/browse/JBIDE-19829?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13072479#comment-13072479 ] 

Andre Dietisheim edited comment on JBIDE-19829 at 5/29/15 5:00 PM:
-------------------------------------------------------------------

When tried to retrieve a token I ended up having the following error: 

!retrieve-error.png!

and in the Eclipse log:
{code}
org.eclipse.swt.SWTError: No more handles [Browser style SWT.MOZILLA and Java system property org.eclipse.swt.browser.DefaultType=mozilla are not supported with GTK 3 as XULRunner is not ported for GTK 3 yet]
	at org.eclipse.swt.SWT.error(SWT.java:4517)
	at org.eclipse.swt.browser.MozillaDelegate.<init>(MozillaDelegate.java:57)
	at org.eclipse.swt.browser.Mozilla.create(Mozilla.java:663)
	at org.eclipse.swt.browser.Browser.<init>(Browser.java:99)
	at org.jboss.tools.openshift.internal.ui.wizard.connection.OAuthDetailView$OAuthDialog.createDialogArea(OAuthDetailView.java:300)
	at org.eclipse.jface.dialogs.Dialog.createContents(Dialog.java:768)
	at org.eclipse.jface.window.Window.create(Window.java:430)
	at org.eclipse.jface.dialogs.Dialog.create(Dialog.java:1096)
	at org.eclipse.jface.window.Window.open(Window.java:792)
	at org.jboss.tools.openshift.internal.ui.wizard.connection.OAuthDetailView$AuthLinkHandler$1.run(OAuthDetailView.java:197)
	at org.eclipse.swt.custom.BusyIndicator.showWhile(BusyIndicator.java:70)
	at org.jboss.tools.openshift.internal.ui.wizard.connection.OAuthDetailView$AuthLinkHandler.widgetSelected(OAuthDetailView.java:186)
	at org.eclipse.swt.widgets.TypedListener.handleEvent(TypedListener.java:248)
	at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:84)
	at org.eclipse.swt.widgets.Display.sendEvent(Display.java:4457)
	at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1317)
	at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1341)
	at org.eclipse.swt.widgets.Widget.sendSelectionEvent(Widget.java:1455)
	at org.eclipse.swt.widgets.Link.gtk_button_release_event(Link.java:372)
	at org.eclipse.swt.widgets.Widget.windowProc(Widget.java:1935)
	at org.eclipse.swt.widgets.Control.windowProc(Control.java:5588)
	at org.eclipse.swt.widgets.Display.windowProc(Display.java:4693)
	at org.eclipse.swt.internal.gtk.OS._gtk_main_do_event(Native Method)
	at org.eclipse.swt.internal.gtk.OS.gtk_main_do_event(OS.java:9256)
	at org.eclipse.swt.widgets.Display.eventProc(Display.java:1225)
	at org.eclipse.swt.internal.gtk.OS._g_main_context_iteration(Native Method)
	at org.eclipse.swt.internal.gtk.OS.g_main_context_iteration(OS.java:2422)
	at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3404)
	at org.eclipse.jface.window.Window.runEventLoop(Window.java:827)
	at org.eclipse.jface.window.Window.open(Window.java:803)
	at org.jboss.tools.common.ui.WizardUtils.openWizardDialog(WizardUtils.java:238)
	at org.jboss.tools.openshift.internal.common.ui.command.NewConnectionHandler.execute(NewConnectionHandler.java:29)
	at org.eclipse.ui.internal.handlers.HandlerProxy.execute(HandlerProxy.java:295)
	at org.eclipse.ui.internal.handlers.E4HandlerProxy.execute(E4HandlerProxy.java:90)
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
	at java.lang.reflect.Method.invoke(Method.java:606)
	at org.eclipse.e4.core.internal.di.MethodRequestor.execute(MethodRequestor.java:56)
	at org.eclipse.e4.core.internal.di.InjectorImpl.invokeUsingClass(InjectorImpl.java:252)
	at org.eclipse.e4.core.internal.di.InjectorImpl.invoke(InjectorImpl.java:234)
	at org.eclipse.e4.core.contexts.ContextInjectionFactory.invoke(ContextInjectionFactory.java:132)
	at org.eclipse.e4.core.commands.internal.HandlerServiceHandler.execute(HandlerServiceHandler.java:152)
	at org.eclipse.core.commands.Command.executeWithChecks(Command.java:493)
	at org.eclipse.core.commands.ParameterizedCommand.executeWithChecks(ParameterizedCommand.java:486)
	at org.eclipse.e4.core.commands.internal.HandlerServiceImpl.executeHandler(HandlerServiceImpl.java:210)
	at org.eclipse.e4.ui.workbench.renderers.swt.HandledContributionItem.executeItem(HandledContributionItem.java:799)
	at org.eclipse.e4.ui.workbench.renderers.swt.HandledContributionItem.handleWidgetSelection(HandledContributionItem.java:675)
	at org.eclipse.e4.ui.workbench.renderers.swt.HandledContributionItem.access$7(HandledContributionItem.java:659)
	at org.eclipse.e4.ui.workbench.renderers.swt.HandledContributionItem$4.handleEvent(HandledContributionItem.java:592)
	at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:84)
	at org.eclipse.swt.widgets.Display.sendEvent(Display.java:4457)
	at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1317)
	at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java:3795)
	at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3406)
	at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine$4.run(PartRenderingEngine.java:1127)
	at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:337)
	at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine.run(PartRenderingEngine.java:1018)
	at org.eclipse.e4.ui.internal.workbench.E4Workbench.createAndRunUI(E4Workbench.java:156)
	at org.eclipse.ui.internal.Workbench$5.run(Workbench.java:654)
	at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:337)
	at org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Workbench.java:598)
	at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.java:150)
	at org.eclipse.ui.internal.ide.application.IDEApplication.start(IDEApplication.java:139)
	at org.eclipse.equinox.internal.app.EclipseAppHandle.run(EclipseAppHandle.java:196)
	at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.runApplication(EclipseAppLauncher.java:134)
	at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.start(EclipseAppLauncher.java:104)
	at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:380)
	at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:235)
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
	at java.lang.reflect.Method.invoke(Method.java:606)
	at org.eclipse.equinox.launcher.Main.invokeFramework(Main.java:653)
	at org.eclipse.equinox.launcher.Main.basicRun(Main.java:608)
	at org.eclipse.equinox.launcher.Main.run(Main.java:1499)
	at org.eclipse.equinox.launcher.Main.main(Main.java:1472
{code}

I'm not very sure what's causing this?


was (Author: adietish):
When tried to retrieve a token for http://openshift.redhat.com (which of course is the wrong server) I ended up having the following error: 

!retrieve-error.png!

and in the Eclipse log:
{code}
com.openshift.restclient.OpenShiftException: Client protocol exception while trying to get authorization context for server https://openshift.redhat.com
	at com.openshift.internal.restclient.authorization.AuthorizationClient.getContextUsingCredentials(AuthorizationClient.java:128)
	at com.openshift.internal.restclient.authorization.AuthorizationClient.getAuthorizationDetails(AuthorizationClient.java:74)
	at com.openshift.internal.restclient.DefaultClient.getAuthorizationDetails(DefaultClient.java:411)
	at org.jboss.tools.openshift.internal.ui.wizard.connection.OAuthDetailView$AuthDetailsJob.run(OAuthDetailView.java:236)
	at org.eclipse.core.internal.jobs.Worker.run(Worker.java:55)
Caused by: org.apache.http.client.ClientProtocolException
	at org.apache.http.impl.client.InternalHttpClient.doExecute(InternalHttpClient.java:186)
	at org.apache.http.impl.client.CloseableHttpClient.execute(CloseableHttpClient.java:82)
	at org.apache.http.impl.client.CloseableHttpClient.execute(CloseableHttpClient.java:106)
	at com.openshift.internal.restclient.authorization.AuthorizationClient.getContextUsingCredentials(AuthorizationClient.java:123)
	... 4 more
Caused by: org.apache.http.ProtocolException: Received redirect response HTTP/1.1 404 Not Found but no location header
	at org.apache.http.impl.client.DefaultRedirectStrategy.getLocationURI(DefaultRedirectStrategy.java:134)
	at com.openshift.internal.restclient.authorization.OpenShiftAuthorizationRedirectStrategy.isRedirected(OpenShiftAuthorizationRedirectStrategy.java:58)
	at org.apache.http.impl.execchain.RedirectExec.execute(RedirectExec.java:111)
	at org.apache.http.impl.client.InternalHttpClient.doExecute(InternalHttpClient.java:184)
	... 7 more
{code}

[~jcantrill] I guess we'll file this to a new issue?

> Add Oauth support to the Openshift Connection Wizard
> ----------------------------------------------------
>
>                 Key: JBIDE-19829
>                 URL: https://issues.jboss.org/browse/JBIDE-19829
>             Project: Tools (JBoss Tools)
>          Issue Type: Feature Request
>          Components: openshift
>    Affects Versions: 4.3.0.Beta2
>            Reporter: Jeff Cantrill
>            Assignee: Jeff Cantrill
>         Attachments: Proposed Connection Wizard Chages.png, retrieve-error.png
>
>
> Modify the connection wizard so the v3 server can auto-detect the auth type and support OAuth
> * Remove server type verify button
> * Add v3 auth box (Auto/OAuth/Basic)
> * Optional...



--
This message was sent by Atlassian JIRA
(v6.3.15#6346)


More information about the jbosstools-issues mailing list