When calling the REST endpoint, I´ve passed the credentials using the basic authentication header.
The user:password has been encoded in Base64.
My REST call is as follows:
curl -X POST \
-H 'Authorization: Basic cm9nZXJpby5iaW9uZGlAbHVpemFsYWJzLmNvbTpwYXNz' \
-H 'Content-Type: application/json' \
-H 'cache-control: no-cache' \
-d '{
"@class" : "org.apereo.cas.services.RegexRegisteredService",
"serviceId" : "test",
"name" : "test",
"id" : 1,
"description": "Teste"
}'
When calling the message in the log confirms that the user is authenticated:
2019-04-25 11:51:30,371 INFO [org.apereo.cas.authentication.PolicyBasedAuthenticationManager] - <Authenticated princi
2019-04-25 11:51:30,371 INFO [org.apereo.inspektr.audit.support.Slf4jLoggingAuditTrailManager] - <Audit trail record BEGIN
=============================================================
WHAT: Supplied credentials: [UsernamePasswordCredential(username=
us...@lalala.com, source=null, customFields={})]
ACTION: AUTHENTICATION_SUCCESS
APPLICATION: CAS
WHEN: Thu Apr 25 11:51:30 BRT 2019
CLIENT IP ADDRESS: 0:0:0:0:0:0:0:1
SERVER IP ADDRESS: 0:0:0:0:0:0:0:1
=============================================================
CLIENT IP ADDRESS: 0:0:0:0:0:0:0:1
SERVER IP ADDRESS: 0:0:0:0:0:0:0:1
=============================================================
But I'm getting the error "Request is not authorized" in the REST client.
Has someone faced this issue? Any help?
Thank you very much.
Best regards,
Rogerio