Error getting authorization code

Forum for users and developers of Bullhorn's API service.

Moderators: StaffingSupport, s.emmons, BullhornSupport

Post Reply
DaveGKew
User
Posts: 5
Joined: Tue Oct 29, 2019 4:30 am

Error getting authorization code

Post by DaveGKew » Tue Oct 29, 2019 4:44 am

Hi, we have recently been set up with API credentials, but we are having issues getting an authorization code. I have tried to navigate to the url

https://auth-emea.bullhornstaffing.com/ ... ={optional redirect_uri}

replacing the {} values with the client id we were provided and a url encoded copy of the redirect uri we provided during setup (ie https%3A%2F%2Fbullhorn.kewtest.co.uk). I changed the start of the url after confirming they were on the UK data center.

However, when trying to access the URL with the redirect_uri present, we get "Invalid Redirect URI redirect uri : null".

We have also tried completly removing the redirect_uri as it is listed as optional (and previous forum posts suggest this should work). However doing this gives us a http 500 Apache error page, with the following stack trace

Code: Select all

javax.servlet.ServletException
	com.intergral.fusionreactor.j2ee.filterchain.WrappedFilterChain.doFilter(WrappedFilterChain.java:165)
	com.intergral.fusionreactor.j2ee.filter.FusionReactorRequestHandler.doNext(FusionReactorRequestHandler.java:763)
	com.intergral.fusionreactor.j2ee.filter.FusionReactorRequestHandler.doHttpServletRequest(FusionReactorRequestHandler.java:351)
	com.intergral.fusionreactor.j2ee.filter.FusionReactorRequestHandler.doFusionRequest(FusionReactorRequestHandler.java:214)
	com.intergral.fusionreactor.j2ee.filter.FusionReactorRequestHandler.handle(FusionReactorRequestHandler.java:800)
	com.intergral.fusionreactor.j2ee.filter.FusionReactorCoreFilter.doFilter(FusionReactorCoreFilter.java:36)
	sun.reflect.GeneratedMethodAccessor45.invoke(Unknown Source)
	sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
	java.lang.reflect.Method.invoke(Method.java:606)
	com.intergral.fusionreactor.j2ee.filterchain.WrappedFilterChain.doFilter(WrappedFilterChain.java:71)
	sun.reflect.GeneratedMethodAccessor44.invoke(Unknown Source)
	sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
	java.lang.reflect.Method.invoke(Method.java:606)
	com.intergral.fusionreactor.agent.filter.FusionReactorStaticFilter.doFilter(FusionReactorStaticFilter.java:54)
	com.intergral.fusionreactor.agent.pointcuts.NewFilterChainPointCut$1.invoke(NewFilterChainPointCut.java:41)
	org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:472)
	org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:99)
	org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:947)
	org.apache.catalina.valves.RemoteIpValve.invoke(RemoteIpValve.java:680)
	org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:408)
	org.apache.coyote.http11.AbstractHttp11Processor.process(AbstractHttp11Processor.java:1009)
	org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.java:589)
	org.apache.tomcat.util.net.JIoEndpoint$SocketProcessor.run(JIoEndpoint.java:312)
	java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
	java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
	java.lang.Thread.run(Thread.java:745)

root cause

java.lang.NullPointerException
	java.net.URLEncoder.encode(URLEncoder.java:205)
	com.bullhorn.oauth.handler.Handler.urlEncode(Handler.java:19)
	com.bullhorn.oauth.handler.AuthorizeHandler.redirect(AuthorizeHandler.java:107)
	com.bullhorn.oauth.handler.AuthorizeHandler.redirectError(AuthorizeHandler.java:727)
	com.bullhorn.oauth.handler.AuthorizeHandler.informServerError(AuthorizeHandler.java:711)
	com.bullhorn.oauth.handler.AuthorizeHandler.handle(AuthorizeHandler.java:261)
	com.bullhorn.oauth.servlet.OAuthDispatcher.dispatch(OAuthDispatcher.java:123)
	com.bullhorn.oauth.servlet.OAuthServlet.service(OAuthServlet.java:44)
	javax.servlet.http.HttpServlet.service(HttpServlet.java:728)
	com.bullhorn.common.servlet.CorsFilter.doFilter(CorsFilter.java:119)
	org.springframework.security.util.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:378)
	org.springframework.security.intercept.web.FilterSecurityInterceptor.invoke(FilterSecurityInterceptor.java:109)
	org.springframework.security.intercept.web.FilterSecurityInterceptor.doFilter(FilterSecurityInterceptor.java:83)
	org.springframework.security.util.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:390)
	org.springframework.security.ui.SessionFixationProtectionFilter.doFilterHttp(SessionFixationProtectionFilter.java:67)
	org.springframework.security.ui.SpringSecurityFilter.doFilter(SpringSecurityFilter.java:53)
	org.springframework.security.util.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:390)
	org.springframework.security.ui.ExceptionTranslationFilter.doFilterHttp(ExceptionTranslationFilter.java:101)
	org.springframework.security.ui.SpringSecurityFilter.doFilter(SpringSecurityFilter.java:53)
	org.springframework.security.util.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:390)
	org.springframework.security.providers.anonymous.AnonymousProcessingFilter.doFilterHttp(AnonymousProcessingFilter.java:105)
	org.springframework.security.ui.SpringSecurityFilter.doFilter(SpringSecurityFilter.java:53)
	org.springframework.security.util.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:390)
	org.springframework.security.ui.rememberme.RememberMeProcessingFilter.doFilterHttp(RememberMeProcessingFilter.java:109)
	org.springframework.security.ui.SpringSecurityFilter.doFilter(SpringSecurityFilter.java:53)
	org.springframework.security.util.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:390)
	org.springframework.security.wrapper.SecurityContextHolderAwareRequestFilter.doFilterHttp(SecurityContextHolderAwareRequestFilter.java:91)
	org.springframework.security.ui.SpringSecurityFilter.doFilter(SpringSecurityFilter.java:53)
	org.springframework.security.util.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:390)
	org.springframework.security.ui.basicauth.BasicProcessingFilter.doFilterHttp(BasicProcessingFilter.java:174)
	org.springframework.security.ui.SpringSecurityFilter.doFilter(SpringSecurityFilter.java:53)
	org.springframework.security.util.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:390)
	org.springframework.security.ui.webapp.DefaultLoginPageGeneratingFilter.doFilterHttp(DefaultLoginPageGeneratingFilter.java:86)
	org.springframework.security.ui.SpringSecurityFilter.doFilter(SpringSecurityFilter.java:53)
	org.springframework.security.util.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:390)
	org.springframework.security.ui.AbstractProcessingFilter.doFilterHttp(AbstractProcessingFilter.java:278)
	org.springframework.security.ui.SpringSecurityFilter.doFilter(SpringSecurityFilter.java:53)
	org.springframework.security.util.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:390)
	org.springframework.security.ui.logout.LogoutFilter.doFilterHttp(LogoutFilter.java:89)
	org.springframework.security.ui.SpringSecurityFilter.doFilter(SpringSecurityFilter.java:53)
	org.springframework.security.util.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:390)
	org.springframework.security.context.HttpSessionContextIntegrationFilter.doFilterHttp(HttpSessionContextIntegrationFilter.java:235)
	org.springframework.security.ui.SpringSecurityFilter.doFilter(SpringSecurityFilter.java:53)
	org.springframework.security.util.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:390)
	org.springframework.security.util.FilterChainProxy.doFilter(FilterChainProxy.java:175)
	org.springframework.web.filter.DelegatingFilterProxy.invokeDelegate(DelegatingFilterProxy.java:236)
	org.springframework.web.filter.DelegatingFilterProxy.doFilter(DelegatingFilterProxy.java:167)

mholmemi
User
Posts: 24
Joined: Fri Feb 15, 2019 10:31 am

Re: Error getting authorization code

Post by mholmemi » Mon Nov 04, 2019 10:37 am

Hi Mikaela,

This is Mikaela from Bullhorn Support and I have taken ownership of this ticket.
Can you please send me the client ID that you are using? I can check on the issue with the redirect URL.

I look forward to hearing from you.
Mikaela Holme-Miller | Tier II/Enterprise Support Analyst

DaveGKew
User
Posts: 5
Joined: Tue Oct 29, 2019 4:30 am

Re: Error getting authorization code

Post by DaveGKew » Thu Nov 07, 2019 11:10 am

Hi Mikaela,

Apologies for the delays response, the client_id we are using is bd323428-c46b-452f-bda0-c53a40be187c. Whenever we try to add the redirect uri on, we get the error in the original post.

If I use the link without the optional redirect uri, it works, but only on some browsers.
On my local machine, using https://auth-emea.bullhornstaffing.com/ ... _type=code in Chrome, it works pefectly fine, however using the exact same link in firefox gives me the error screen with the following apache error report.

Code: Select all

type Exception report

message

description The server encountered an internal error that prevented it from fulfilling this request.

exception

javax.servlet.ServletException
	com.intergral.fusionreactor.j2ee.filterchain.WrappedFilterChain.doFilter(WrappedFilterChain.java:165)
	com.intergral.fusionreactor.j2ee.filter.FusionReactorRequestHandler.doNext(FusionReactorRequestHandler.java:763)
	com.intergral.fusionreactor.j2ee.filter.FusionReactorRequestHandler.doHttpServletRequest(FusionReactorRequestHandler.java:351)
	com.intergral.fusionreactor.j2ee.filter.FusionReactorRequestHandler.doFusionRequest(FusionReactorRequestHandler.java:214)
	com.intergral.fusionreactor.j2ee.filter.FusionReactorRequestHandler.handle(FusionReactorRequestHandler.java:800)
	com.intergral.fusionreactor.j2ee.filter.FusionReactorCoreFilter.doFilter(FusionReactorCoreFilter.java:36)
	sun.reflect.GeneratedMethodAccessor48.invoke(Unknown Source)
	sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
	java.lang.reflect.Method.invoke(Method.java:606)
	com.intergral.fusionreactor.j2ee.filterchain.WrappedFilterChain.doFilter(WrappedFilterChain.java:71)
	sun.reflect.GeneratedMethodAccessor47.invoke(Unknown Source)
	sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
	java.lang.reflect.Method.invoke(Method.java:606)
	com.intergral.fusionreactor.agent.filter.FusionReactorStaticFilter.doFilter(FusionReactorStaticFilter.java:54)
	com.intergral.fusionreactor.agent.pointcuts.NewFilterChainPointCut$1.invoke(NewFilterChainPointCut.java:41)
	org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:472)
	org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:99)
	org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:947)
	org.apache.catalina.valves.RemoteIpValve.invoke(RemoteIpValve.java:680)
	org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:408)
	org.apache.coyote.http11.AbstractHttp11Processor.process(AbstractHttp11Processor.java:1009)
	org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.java:589)
	org.apache.tomcat.util.net.JIoEndpoint$SocketProcessor.run(JIoEndpoint.java:312)
	java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
	java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
	java.lang.Thread.run(Thread.java:745)

root cause

java.lang.NullPointerException

note The full stack trace of the root cause is available in the Apache Tomcat/7.0.39 logs.
When the recruiter has tried using the link on their Chrome, they also get the same error page, so we would be keen for help on identifying the cause of this and how we can ensure that the link can be accessed on any browser

mholmemi
User
Posts: 24
Joined: Fri Feb 15, 2019 10:31 am

Re: Error getting authorization code

Post by mholmemi » Thu Nov 07, 2019 11:45 am

Hi Dave,

I have just checked that client ID and I see the redirect URI is: https://bullhorn.kewtest.co.uk/
I found something else on the setup that could cause issues and fixed that as well. Can you please try again and me let me know if you are now able to get the auth code?

Best,
Mikaela
Mikaela Holme-Miller | Tier II/Enterprise Support Analyst

DaveGKew
User
Posts: 5
Joined: Tue Oct 29, 2019 4:30 am

Re: Error getting authorization code

Post by DaveGKew » Mon Nov 11, 2019 4:08 am

Hi Mikaela,

That seems to be working for me now, I will get the recruiter to test their end as they also had an issue in a different browser and then confirm once they let me know its working. Thanks for your help

DaveGKew
User
Posts: 5
Joined: Tue Oct 29, 2019 4:30 am

Re: Error getting authorization code

Post by DaveGKew » Tue Nov 12, 2019 8:54 am

I can confirm this also works for the client. Thanks for your help with this.

doubledash
User
Posts: 3
Joined: Mon Nov 18, 2019 6:07 pm

Re: Error getting authorization code

Post by doubledash » Mon Nov 18, 2019 6:26 pm

mholmemi wrote:
Thu Nov 07, 2019 11:45 am
Hi Dave,

I have just checked that client ID and I see the redirect URI is: https://bullhorn.kewtest.co.uk/
I found something else on the setup that could cause issues and fixed that as well. Can you please try again and me let me know if you are now able to get the auth code?

Best,
Mikaela
Hi,

We're also having a similar behavior as mentioned above. Except:

- If i'm in the same browser session (Chrome or otherwise) as where I've previously logged in with Bullhorn's application, it is reproduced (`NullPointerException` error)
- If I'm in a different browser session (e.g. incognito mode) - the problem is not reproduced and I can login successfully.

Client ID is `659e7fd5-41a3-4bf5-b897-030bc07ed753`.
@mholmemi do you think you could help us out as well?

dreameral
User
Posts: 1
Joined: Mon Nov 25, 2019 1:04 pm

Re: Error getting authorization code

Post by dreameral » Wed Nov 27, 2019 4:20 am

Hi,

I can confirm the same issue as the one doubledash mentioned.

In a private/incognito window the login page is shown successfully, otherwise a 500 internal NullPointer Exception is thrown in your servers.
Is there some misconfiguration we did or is this a bug?

Post Reply