OAuth 2.0 playground (the playground) is an OAuth client sample app for WSO2 Identity Server (the WSO2-IS). I can execute playground with WSO2-IS v4.0.0m3, but it's crashed with WSO2-IS v4.0.0m9 (the exception message as the following). Is playground already updated for IS v4.0.0m9? How to update/fix playground sample?
--- HTTP500 ---
java.lang.NullPointerException
org.wso2.carbon.identity.oauth.ui.client.OAuth2ServiceClient._validateClient(OAuth2ServiceClient.java:113)
org.wso2.carbon.identity.oauth.ui.client.OAuth2ServiceClient.validateClient(OAuth2ServiceClient.java:107)
org.wso2.carbon.identity.oauth.ui.endpoints.authz.OAuth2AuthzEndpoint.validateClient(OAuth2AuthzEndpoint.java:171)
org.wso2.carbon.identity.oauth.ui.endpoints.authz.OAuth2AuthzEndpoint.handleOAuthAuthorizationRequest(OAuth2AuthzEndpoint.java:106)
org.wso2.carbon.identity.oauth.ui.endpoints.authz.OAuth2AuthzEndpoint.service(OAuth2AuthzEndpoint.java:70)
Related
I'm using AzureAD Library for Objective-C (https://github.com/AzureAD/azure-activedirectory-library-for-objc) to connect to ADFS 3.0 on 2012 R2 using the OAuth 2 Authorization Code grant flow.
I'm getting the error:
Error with code: AD_ERROR_DEVELOPER_INVALID_ARGUMENT
Domain: ADAuthenticationErrorDomain ProtocolCode:(null)
Details:The argument 'user principal name' is invalid.
Value:(null).
Inner error details: Error Domain=ADAuthenticationErrorDomain Code=100 "(null)"
We have an android app that is connecting successfully, so I don't think this is the real error.
I'm using v2.6.3 of the library on iOS 11.3, both on an iPhone 6 and on the simulator with the same results.
I'm reproduced the issue using the SampleSwiftApp included with the repo, with no code changes apart from the configuration.
Is v2.6.3 compatible with ADFS v3.0 on 2012 R2?
Can I get it to work with a configuration change?
ADFS v3.0 doesn't support authority validation, so I updated the authentication context constructor from:
let authContext = ADAuthenticationContext(authority: AdalAuthority,
error: nil)
to:
let authContext = ADAuthenticationContext(authority: AdalAuthority,
validateAuthority: false,
error: nil)
to get it to work.
Trying to authenticate with the JIRA API using Java code (integrated with Okta SSO). I tried basic authentication but had no luck. The exception is:
2017-01-05 14:22:15.112 ERROR 5824 --- [ent-io:thread-1]
o.a.h.n.p.HttpAsyncRequestExecutor : http-outgoing-1 [CLOSED]
HTTP protocol exception: null
java.nio.channels.ClosedChannelException: null
at sun.nio.ch.SocketChannelImpl.ensureReadOpen(SocketChannelImpl.java:257)
at sun.nio.ch.SocketChannelImpl.read(SocketChannelImpl.java:300)
at org.apache.http.nio.reactor.ssl.SSLIOSession.receiveEncryptedData(SSLIOSession.java:340)
at org.apache.http.nio.reactor.ssl.SSLIOSession.isAppInputReady(SSLIOSession.java:366)
at org.apache.http.impl.nio.reactor.AbstractIODispatch.inputReady(AbstractIODispatch.java:118)
at org.apache.http.impl.nio.reactor.BaseIOReactor.validate(BaseIOReactor.java:220)
at org.apache.http.impl.nio.reactor.AbstractIOReactor.execute(AbstractIOReactor.java:284)
at org.apache.http.impl.nio.reactor.BaseIOReactor.execute(BaseIOReactor.java:106)
at org.apache.http.impl.nio.reactor.AbstractMultiworkerIOReactor$Worker.run(AbstractMultiworkerIOReactor.java:604)
at java.lang.Thread.run(Thread.java:745)
java.nio.channels.ClosedChannelException:null
at sun.nio.ch.SocketChannelImpl.ensureReadOpen(SocketChannelImpl.java:257)
I am trying to understand if there is any other way to authenticate the JIRA API?
I`m trying to run playground2 example and authorize with WSO2 Identity server 5.0.0 using OAuth2. And when I choose the authorization_code grant type application failed to obtain token since identity server returns 401 error.
But with Identity Server 4.6.0 it works fine.
Authentication parameters is:
grant_type: authorization_code
client_id: XXXXXXX
scope:
callback url: http://localhost:8081/oauth2client
authorize endpoint: https://localhost:9443/oauth2/authorize
Is it a bug of WSO2IS 5.0.0?
Pls obtain the latest playground app from this location.
You call back url seems to be wrong. Please follow the steps given in this document which is explained for Identity Server 5.0.
I am using wso2 API manager over one of the rest APIs we have . Every time I hit the service on wso2, I am getting the below mentioned error though the application is running fine. I have tried setting OPTIONS as "None" but in vain.
Can someone suggest how to fix it?
2014-03-25 19:36:05,647 [-] [PassThroughMessageProcessor-9] ERROR APIAuthenticationHandler API authentication failure
org.wso2.carbon.apimgt.gateway.handlers.security.APISecurityException: Required OAuth credentials not provided
at org.wso2.carbon.apimgt.gateway.handlers.security.oauth.OAuthAuthenticator.authenticate(OAuthAuthenticator.java:114)
at org.wso2.carbon.apimgt.gateway.handlers.security.APIAuthenticationHandler.handleRequest(APIAuthenticationHandler.java:92)
at org.apache.synapse.rest.API.process(API.java:285)
at org.apache.synapse.rest.RESTRequestHandler.dispatchToAPI(RESTRequestHandler.java:76)
at org.apache.synapse.rest.RESTRequestHandler.process(RESTRequestHandler.java:63)
at org.apache.synapse.core.axis2.Axis2SynapseEnvironment.injectMessage(Axis2SynapseEnvironment.java:220)
at org.apache.synapse.core.axis2.SynapseMessageReceiver.receive(SynapseMessageReceiver.java:83)
at org.apache.axis2.engine.AxisEngine.receive(AxisEngine.java:180)
at org.apache.synapse.transport.passthru.ServerWorker.processNonEntityEnclosingRESTHandler(ServerWorker.java:336)
at org.apache.synapse.transport.passthru.ServerWorker.processEntityEnclosingRequest(ServerWorker.java:377)
at org.apache.synapse.transport.passthru.ServerWorker.run(ServerWorker.java:183)
at org.apache.axis2.transport.base.threads.NativeWorkerPool$1.run(NativeWorkerPool.java:172)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
at java.lang.Thread.run(Thread.java:724)
According to the error it seems you are not sending the Authorization header. Can you specify which client you are using to send the request?
I'm trying to use WSO2 Identity server for OAuth token management for my own web application.
I exactly follow the instructions in this blog post and downloaded WSO2 identity server 3.2.3, wso2esb 4.0.3, wso2as 4.1.2 in Ubuntu 10.04. I successfully got the access token.
However, when I ran the code in the last part of the blog in Eclipse(I've already used the correct CONSUMER_SECRET,CONSUMER_KEY and OAUTH_TOKEN in the code), I ended up with an error:
java.net.ConnectException: Connection refused
at java.net.PlainSocketImpl.socketConnect(Native Method)
at java.net.AbstractPlainSocketImpl.doConnect(AbstractPlainSocketImpl.java:327)
at java.net.AbstractPlainSocketImpl.connectToAddress(AbstractPlainSocketImpl.java:193)
at java.net.AbstractPlainSocketImpl.connect(AbstractPlainSocketImpl.java:180)
at java.net.SocksSocketImpl.connect(SocksSocketImpl.java:384)
at java.net.Socket.connect(Socket.java:546)
at java.net.Socket.connect(Socket.java:495)
at sun.net.NetworkClient.doConnect(NetworkClient.java:178)
at sun.net.www.http.HttpClient.openServer(HttpClient.java:409)
at sun.net.www.http.HttpClient.openServer(HttpClient.java:530)
at sun.net.www.http.HttpClient.<init>(HttpClient.java:240)
at sun.net.www.http.HttpClient.New(HttpClient.java:321)
at sun.net.www.http.HttpClient.New(HttpClient.java:338)
at sun.net.www.protocol.http.HttpURLConnection.getNewHttpClient(HttpURLConnection.java:935)
at sun.net.www.protocol.http.HttpURLConnection.plainConnect(HttpURLConnection.java:876)
at sun.net.www.protocol.http.HttpURLConnection.connect(HttpURLConnection.java:801)
at com.google.gdata.client.http.HttpGDataRequest.execute(HttpGDataRequest.java:488)
at com.google.gdata.client.http.GoogleGDataRequest.execute(GoogleGDataRequest.java:515)
at org.wso2.rest.security.oauth.OauthClient.main(OauthClient.java:44)
I'm sure the service port is available and can't figure out what the problem is. Could anyone provide any help?
Besides, in the example in that blog, it seems like I have to connect my own web application to ESB to validate the token. Is there any API I can use in my app to validate the token directly with the Identity Server? Or how should I connect my Jsp web app to the ESB?
In your client code, please change following
private static final String ESB = "http://127.0.0.1:8280/";
To
private static final String ESB = "http://127.0.0.1:8282/";