Using rest api error.
See original GitHub issueHi. Thank you for this project. It is best for cas auto config. But i have a little problem.
I did a cas-client project with gradle and it looks like good. My application.yml is that:
security:
basic:
enabled: false
ignored: /
cas:
paths: /protected
server:
base-url: https://localhost:10100/cas
protocol-version: 2
service:
base-url: https://localhost:8443
paths:
proxy-callback: /j_spring_cas_security_proxyreceptor
server:
port: 8443
ssl:
enabled: true
key-store: file:/etc/keystore/localhost.jks
key-store-password: changeit
Cas server runs on 10100 port. The client web project works good. But i want to access controller to through get and post method.
I try that: (i use postman)
- step :
Header:
POST https://localhost:10100/cas/v1/tickets
Content-Type: application/x-www-form-urlencoded
Body:
username=myname&password=123456
- step result: Body (html format):
<!DOCTYPE HTML PUBLIC \"-//IETF//DTD HTML 2.0//EN\">
<html>
<head>
<title>201 Created</title>
</head>
<body>
<h1>TGT Created</h1>
<form action="https://localhost:10100/cas/v1/tickets/TGT-32-NfRV2HIYL6JlqUFTpJuc6EfUyH6q9BImaS0a5CPyOpInrO3fqk-8ee6f154afba" method="POST">Service:
<input type="text" name="service" value="">
<br>
<input type="submit" value="Submit">
</form>
</body>
</html>
- step: I want to get a service ticket for “https://localhost:8443/protected”
Header:
POST https://localhost:10100/cas/v1/tickets/TGT-32-NfRV2HIYL6JlqUFTpJuc6EfUyH6q9BImaS0a5CPyOpInrO3fqk-8ee6f154afba
Content-Type: application/x-www-form-urlencoded
Body:
service=https%3A%2F%2Flocalhost%3A8443%2Fprotected
- step result:
ST-171-b2Sz3TseQlmFjthK7xqV-8ee6f154afba
- step:
Header:
GET https://localhost:8443/protected?ticket=ST-171-b2Sz3TseQlmFjthK7xqV-8ee6f154afba
I expect my protected page html format. But i saw login page. What is the problem? Could you help me?
Issue Analytics
- State:
- Created 6 years ago
- Comments:6 (4 by maintainers)
Top Results From Across the Web
Best Practices for REST API Error Handling - Baeldung
Learn about some of the best practices for handling REST API errors, including useful approaches for providing users with additional ...
Read more >REST API error handling - IBM
The REST API reports errors by returning an appropriate HTTP response code, for example 404 (Not Found), and a JSON response. Any HTTP...
Read more >HTTP Status Codes - REST API Tutorial
A 401 error response indicates that the client tried to operate on a protected resource without providing the proper authorization. It may have ......
Read more >REST API Error Handling Best Practices
A 403 error response indicates that the client's request is formed correctly, but the REST API refuses to honor it. A 403 response...
Read more >Best Practices for REST API Error Handling - apilayer Blog
It is highly desirable in APIs to properly handle errors and provide meaningful error messages, as it can help the API client respond...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
@coskundeniz89 release was upload 2 min ago, you should try it. Please re-open issue or create new one if any issue
Ok @kakawait . Thanks for your help.