How do I authenticate using the orientdb-api.js in the browser on OrientDB 2.0.07. I can open a connection using orientServer.open(username, password) and I get a nice DB object back, but subsequent calls I do return a 401 Unauthorized error.
Related
I have tried this URL : http://lists.jboss.org/pipermail/keycloak-user/2018-September/015665.html, though with no help.
i have an access token to call admin API's
Xtreme Biker is right.
I could get the url from UI console.
/realms//clients//installation/providers/keycloak-oidc-keycloak-json
using client name, client-id can be retrieved using endpoint
/auth/admin/realms/${realm}/clients?clientId=
The catch is the access token that has to be supplied to the admin endpoints to respond successfully.
Access token shall be retrieved using a credentials of a user who has 'manageclients' access to the client role of the realm under which the client is registered.
I am getting a 401 and some cross domain issues when trying to access IBM Weather REST API from either client (browser) or server.
If I generate a URL and try and access it directly from a browser (eg paste it in it works fine and the JSON weather report is returned).
When I try and run the Javascript HTTP request from either the browser or server it seems like it's only allowed to run from an ibm.com domain.
Failed to load https://twcservice.au-syd.mybluemix.net/api/weather/v1/geocode/-33.00/151.00/forecast/daily/7day.json?units=m&language=en-US: The 'Access-Control-Allow-Origin' header contains multiple values 'https://*.ibm.com, https://*.ibmcloud.com', but only one is allowed. Origin 'http://localhost:3000' is therefore not allowed access.
I am using the free service on Bluemix. Is this restricted to only run via a Bluemix server? or are there some options I can pass when I create the service on Bluemix
Note, when I make the request I am using the credentials supplied via the Bluemix console. Again, this works via the browser URL bar, but not via code.
Update/More info: if I hit past the URL above into the browser (with creds) it works as above, then if hit it via the web app in the same session it works.
Hmmm. So the IBM server is sending the following response header:
Access-Control-Allow-Origin: https://*.ibm.com, https://*.ibmcloud.com
That's an invalid response from IBM. Unfortunately, I think your only option is to complain to IBM, and convince them to
Return a valid Access-Control-Allow-Origin response header (with only one value)
Allow people outside of IBM to access it
Without that, I fear you're out of luck.
I am trying to list batch processes using the Intershop REST API (https://support.intershop.com/kb/index.php/Display/2500N0):
GET http://localhost/INTERSHOP/rest/BOS/inSPIRED-Site/inTRONICS/batchprocesses/productimports
I use basic authentication with user 'admin', but still get:
401 Unauthorized (User is not authenticated in expected context)
What am I missing?
The mentioned REST API call is part of the Intershop Backoffice REST API.
It is configured to work only via HTTPS protocol.
(See app_bo_catalog PrefixREST-Start pipeline).
When used with HTTP protocol an error message is returned.
Try to access the REST call via HTTPS.
I'm trying to use the Stash REST API in order to get a list of all open pull requests using the URI https://stash.myserver.com/stash/rest/api/1.0/projects/TEST/repos/testrepo
But I always get a 401 Unauthorized with the following content:
{"errors":[{"context":null,"message":"You are not permitted to access this resource","exceptionName":"com.atlassian.stash.exception.AuthorisationException"}]}
I use HTTP Basic Auth and the user definitely has proper permission to the repository. It also works if I open the REST URL in the browser while I'm logged in or when I use the JSESSIONID-Cookie.
Is it possible that I need to enable basic auth in Stash? I couldn't find such an option in the admin settings.
I'm implementing an Ouath2 authentication with Spring for our mobile API. So far it works but I don't know how I should keep the resource server separate. So I have an auth server which gives out tokens and refresh tokens using the password grant-type. Meaning the user would log into the mobile app, which sends the auth server the client id/client secret along with the user's
credentials, which results in an access token and a refresh token for the user with the appropriate (ROLE_USER) privileges. Another web based client is for the admins who do the same and get the ROLE_ADMIN privilege etc.
This works well so far.
Now if any client sends a request to the resource server what should happen? Should the resource server check the token's validity? If so in what way? Or should the auth server copy the token into the resource-server's database?
If you #EnableResourceServer you get a filter that checks access tokens. It needs to share a TokenStore with the auth server. That's about it to get something working.