CAS Access Token Not Supported in 6.5.2 - oauth-2.0

I am using CAS-Server as my oAuth server and did all the configuration as mentioned in the documentation.
But when I try to hit the postman for generating accessToken I am getting the below exception.
2022-04-28 22:11:58,625 ERROR [org.apereo.cas.support.oauth.web.endpoints.OAuth20AccessTokenEndpointController] -
java.lang.UnsupportedOperationException: Access token request is not supported
at org.apereo.cas.support.oauth.web.endpoints.OAuth20AccessTokenEndpointController.lambda$verifyAccessTokenRequest$2(OAuth20AccessTokenEndpointController.java:187) ~[cas-server-support-oauth-core-api-6.5.3.jar!/:6.5.3]
Please help me to resolve this error.

I got same error when I hit 'POST /oidc/accessToken' without passing correct parameters. It works after I pass correct parameters. Try this:
Parameters for /oidc/accessToken

Related

OAuth Error 400: invalid_request Missing scheme: /login

I am trying to use OAuth in my app and I am getting the following error after clicking the login button to be redirected to the generated url.
However, I am getting the following error but I'm pretty sure that I have my URI's configured correctly in the developers console (image below).
Also, I am not finding the same error while searching. Has anyone else encountered this?
I am pretty sure that I have the /login scheme configured correctly as so.
It's worth mentioning that I am following a tutorial series and this is exactly what they recommended. That's another reason I'm pretty confused.
Thanks for any help in advance.
I discovered the issue - I was passing an invalid URL into the options of google.auth.OAuth2( ... )
I failed to realize this because my URL was coming from .env file.

Discrepency with Jenkins Crumb value

I am using Postman API to create new job in Jenkins.Inside Postman UI,with GET request the Jenkins-crumb I am getting gives me proper output i.e.Status 200 Ok when passed into POST request.
But when I am hitting same URL(used in GET request) outside Postman UI, the crumb value that I get gives me "403 NO valid crumb included in request".
How we can solve this issue?
Mostly its due to the security constraints in Jenkins https://jenkins.io/doc/upgrade-guide/2.176/
To fix, you might use options specified in this answer https://stackoverflow.com/a/59261140/374133
I had same issue while using C#, and it got solved by using the same HttpClient for requesting crumb and triggering build. Got the idea from this answer : https://stackoverflow.com/a/63103522/374133

Yii2 Auth Client for Google give error Redirect URI Mismatch after Login

I have encountered error, like images below
First i click login, the error not appeared
But when i login successfully, the application show error like this,
There is no mistake on Oauth Credential, but i think i miss a think.
This error appear just now, my application already run for 2 years
my scope on auth client is email..
Thank You..
There is a bug opened:
https://github.com/yiisoft/yii2-authclient/issues/241
Note that in the config you can set "returnUrl" => "...." so you can fix it without touching the code.
Probably there was some change from Google and now they return also scopes in the URL..
I just found the problem..
In Oauth2.php there is method called fetchAccessToken(), it set redirect_uri to 'http://yourdomain.com/site/login?scope=xxxxxxxx' using getReturnUrl() method, it adds scope parameter. I dont know why. so i set the redirect_uri staticaly and it works again.
now the question is why Oauth2.php is working fine before and now it produces that error? is there any changes somewhere maybe?.

Auth0 Ruby on Rails TCP Error

I am using Auth0's Ruby on Rails API Sample as boilerplate to set up authentication with a new app. Everything is working up to but not including the "Test Your API with cURL" step on the second page of the instructions.
I have tried testing both with cURL and with Postman, and both times I receive the follwoing error:
Errno::ECONNREFUSED in PrivateController#private. Failed to open TCP connection to :443 (Connection refused - connect(2) for nil port 443)
The highlighted line of the error is the following: jwks_raw = Net::HTTP.get URI("https://#{Rails.application.secrets.auth0_domain}/.well-known/jwks.json").
I receive the same error when I clone the sample repo directly and attempt testing with my Access Token, so it seems that it is possibly an oversight or outdated code in their example rather than some error with my incorporation of it into my own app.
How do I resolve this?
Make sure the auth0_domain secret is set when you are passing it to the rails app.
If the value is empty, it will make your initial string an invalid URL, i.e. "https://#{Rails.application.secrets.auth0_domain}/.well-known/jwks.json" turns into "https:///.well-known/jwks.json".
In my case I was using an empty environment variable, which returned nil:
ENV['AUTH0_DOMAIN']
=> nil
Hope this answer helps you!

API console in wso2

I have below URL -
http://localhost:8280/ukAddress/v1/NR12GG/bluemill
in which my base url is http://localhost:8280/ukAddress/v1 & need to pass /NR12GG/bluemill as parameter from API console so that /NR12GG/bluemill will get added to the actual url defined in config xml.
How can i achieve this from API console.
THanks,
Amith
You can use /{streetAddress1}/{streetAddress2} and, you can provide {uri.var.streetAddress1} and {uri.var.streetAddress2} to target backend URL.
You can refer HTTP Endpoint for more details

Resources