Zend Framework 2 SocalNick / ScnSocialAuth module - zend-framework2

I am getting following error message while I am trying to login via facebook using this (https://github.com/SocalNick/ScnSocialAuth) module of ZF 2. Could anyone say what can be the solution ??
Error message
Auth event was stopped without a response. Got "NULL" instead
Thanks

I got the same error. To solve it, I used this explanation : https://github.com/SocalNick/ScnSocialAuth/issues/91
So just remove this line into your composer.json "zf-commons/zfc-user": "dev-master", or "zf-commons/zfc-user": "0.1.*", (that was my error)
and change it to this "zf-commons/zfc-user": "0.1.2",
ps: don't forget to remove into the database the user and the provider, and clear the browser session.

Related

Batch operations are not working after parse migration

I am using parse Rest API from client side i.e iOS application.
Batch operations are not working after migration to Azure. I have changed path from /1/classes/ClassName to /parse/classes/className.
I am getting error as:
{
"code": 107,
"error": "cannot route POST \classes\className"
}
Is there anything to do?
Please help me to solve this issue.
Try ..
http://api-url/parse/classes/classname
Also update - parse lib at client side.(latest version is parse-1.6.14.min.js)
Code 107 normally is a issue with the mount path & publicServerURL. Try change it too be
var mountPath = process.env.PARSE_MOUNT || '/';
And your publicServerURL as
publicServerURL: 'http://api-url/parse/',

getting error when enter uri for timeseries ingest

Hi I am trying to save data in timeseries db but I am facing an error at timeseries ingest when I enter wss://gateway-predix-data-services.run.aws-usw02-pr.ice.predix.io/v1/stream/messages in websocket uri it shows an error like this when I click on open socket
The request failed with status code: 500
{
"error": "Error: unexpected server response (401)",
"url": "wss://gateway-predix-data-services.run.aws-usw02-pr.ice.predix.io/v1/stream/messages"
}
and see this screenshot once.
Thanks&regards
Eswar G
From the error log, it looks you got authorization error. Check if you are using correct predix-zone-id of the time-series instance in the request header or you have configured correct UAA instance in predix tool kit.
Have you updated your UAA client with timeseries authorities?
To inserting time series data with particular user or client need permission. For getting permission, you need to add authorities into your UAA client.
Following are the authorities for timeseries.
Experiencing a similar problem. I'm posting only one of several received error messages. I've cycled through combos of the following for uri and zone id:
uri:
wss://gateway-predix-data-services.run.aws-usw02-pr.ice.predix.io/v1/stream/messages
https://time-series-store-predix.run.aws-usw02-pr.ice.predix.io/v1/datapoints
zone-id:
44853a54-3ecd-4589-85da-b54f2fda7cce
and the zone id shown in the photo, with .ingest at the end.
so, 401 unauthorized.
Did you happen to re-create the timeseries or uaa? Perhaps they are not associated. Also, I'm assuming you did "login as client" in the top menu.
Might be a good idea to create a new timeseries tied to that uaa. Then use the new zoneId.
Did you add predix..ingest and predix..user to the scope and authorities section in uaa client in your predix.io account. Please check the client id to add permission for in websocketriver.config file.

grails oauth2 provider plugin not working as expected

I have been trying to configure the oauth2 provider plugin in my grails application, but I am facing certain issues, and other than the plugin documentation, I didn't find any other sources that could help.
I have followed all the stepd mentioned in the doc, and made changes in Config.groovy
Now hitting localhost:8080/oauth/authorize?response_type=code&client_id=my-client&scope=read should redirect me to login page which it does.
After login however, I want authorization window to appear where user accepts or rejects granting authorization. I am however just getting a JSON result:
{"url":"http://localhost:8080/oauth/authorize?response_type=code&client_id=my-client&scope=read","success":true}
Why am I not getting an authorization prompt instead? What am I missing here?
Okay. So I have made some changes:
grails.plugin.springsecurity.filterChain.filterNames = [
'cookieSessionFilter',
'securityContextPersistenceFilter', 'statelessSecurityContextPersistenceFilter','logoutFilter',
'authenticationProcessingFilter','exceptionTranslationFilter', 'oauth2ProviderFilter', 'clientCredentialsTokenEndpointFilter',
'oauth2BasicAuthenticationFilter', 'securityContextHolderAwareRequestFilter',
'rememberMeAuthenticationFilter','anonymousAuthenticationFilter', 'oauth2ExceptionTranslationFilter', 'filterInvocationInterceptor'
]
grails.plugin.springsecurity.filterChain.chainMap = [
'/oauth/token': 'JOINED_FILTERS, -cookieSessionFilter, -oauth2ProviderFilter,-securityContextPersistenceFilter,-logoutFilter,-authenticationProcessingFilter,-rememberMeAuthenticationFilter,-exceptionTranslationFilter' ,
'/securedOAuth2Resources/**': 'JOINED_FILTERS,-cookieSessionFilter, -securityContextPersistenceFilter,-logoutFilter,-authenticationProcessingFilter,-rememberMeAuthenticationFilter,-oauth2BasicAuthenticationFilter,-exceptionTranslationFilter',
'/**': 'JOINED_FILTERS,-statelessSecurityContextPersistenceFilter,-oauth2ProviderFilter,-clientCredentialsTokenEndpointFilter,-oauth2BasicAuthenticationFilter,-oauth2ExceptionTranslationFilter'
]
Just proper ordering of filters seems to be solving the problem.
With this configuration I am able to generate the access_token.

How to get authentication from user in linkedin?

I am new in creating a application in linkedin. Can some one help in getting the authorization??
I tried this code:
https://www.linkedin.com/uas/oauth2/authorization?response_type=code
&client_id=78lv1rv8ryh1hf
&scope=scope=r_fullprofile%20r_emailaddress%20r_network
&state=DCEEFWF45453sdffef424
&redirect_uri=http://www.mycoolsite.com
I am getting error saying that ...
error=unsupported_response_type&error_description=We+only+support+a+response_type+of+"code"%2C+but+you+passed+code+
There are a few things that can be improved:
you have not URL-encoded the redirect_uri parameter value
you're passing scope= in the scope value, which seems to be a typo/duplicate
you may have inserted a space/line-break in your URL since the following works for me:
https://www.linkedin.com/uas/oauth2/authorization?response_type=code&client_id=78lv1rv8ryh1hf&scope=r_fullprofile%20r_emailaddress%20r_network&state=DCEEFWF45453sdffef424&redirect_uri=http%3A%2F%2Fwww.mycoolsite.com

IllegalArgumentException : Trying to set foreign cookie while downloading Google Spreadsheet via API?

I am trying to download the Google spreadsheet using download API version 3 ( v3 ). I am getting "java.lang.IllegalArgumentException: Trying to set foreign cookie" error message while downloading spreadsheet. I am tried by my google apps account which is authenticated by 2 legged oauth authentication process. Is there anyone facing this kind of problem ?
Here is the error stacktrace :
Servlet.service() for servlet action threw exception|java.lang.IllegalArgumentException: Trying to set foreign cookie
at com.google.gdata.client.http.GoogleGDataRequest$GoogleCookie.<init>(GoogleGDataRequest.java:166)
at com.google.gdata.client.http.GoogleGDataRequest$GoogleCookieHandler.put(GoogleGDataRequest.java:399)
at sun.net.www.http.HttpClient.parseHTTPHeader(HttpClient.java:710)
at sun.net.www.http.HttpClient.parseHTTP(HttpClient.java:632)
at sun.net.www.protocol.http.HttpURLConnection.getInputStream(HttpURLConnection.java:1000)
at sun.net.www.protocol.http.HttpURLConnection.getHeaderFields(HttpURLConnection.java:2053)
at sun.net.www.protocol.https.HttpsURLConnectionImpl.getHeaderFields(HttpsURLConnectionImpl.java:263)
at com.google.gdata.client.http.HttpGDataRequest.isOAuthProxyErrorResponse(HttpGDataRequest.java:558)
at com.google.gdata.client.http.HttpGDataRequest.checkResponse(HttpGDataRequest.java:549)
at com.google.gdata.client.http.HttpGDataRequest.execute(HttpGDataRequest.java:530)
at com.google.gdata.client.http.GoogleGDataRequest.execute(GoogleGDataRequest.java:535)
Edit: This issue occurs only in one of our user's accounts using our App. Its working fine for all other users
I faced the same issue and was able to solve it by changing the url.
The URL I got directly from GDrive:
https://docs.google.com/spreadsheets/d/19Du6mgmzP94vxxHK5httgfK4dqgycQkBBLDq_6I5J7o/edit#gid=1472457471
Had to modify the above to:
https://spreadsheets.google.com/feeds/spreadsheets/**19Du6mgmzP94vxxHK5httgfK4dqgycQkBBLDq_6I5J7o
Hope this will help someone.
I get the service this way:
int GDATA_TIMEOUT = 10* 1000;
spreadsheetService = new SpreadsheetService("cellmaster.com.au-v0.2");
spreadsheetService.setHeader("Authorization", "Bearer " + accessToken);
spreadsheetService.setConnectTimeout(GDATA_TIMEOUT);
spreadsheetService.setReadTimeout(GDATA_TIMEOUT);
And include a retry loop because it does fail once in a while.

Resources