...
The relevant code segment in the our sample webapp wso2 playground2 for OAuth2 can be found here.
Following The following steps provides the guidance on calling the service using the SOAP UI.
- Make admin services WSDL accessible.Open the file wso2is-5.1.0
Open the
Configure "HideAdminServiceWSDLs" property to<IS_HOME>/repository/conf/carbon.xml
file and set the
getHideAdminServiceWSDLs
property to false. (This step is just to makethe
serviceadmin services WSDL accessible. Once the service WSDL is taken make sure to revert this change to hide admin service WSDLs)
Code Block language text <!-- If this parameter is set, the ?wsdl on an admin service will not give the admin service wsdl. --> <HideAdminServiceWSDLs>true</HideAdminServiceWSDLs>
- Restart the serverto make server to make the change effective.
- Go to SOAP UI and give the WSDL location.
Service Name: OAuth2TokenValidationService
WSDL location: https://localhost:9443/services/OAuth2TokenValidationService?wsdl
Provide the parameters to call the validate method as seen below.
- Since this validation service is an admin service, a valid user name and password needs to be provided in order to consume the service.
- Identifier value is the token to be validated.
- If user claims are also required while validating the access token, a list of claim URIs can be provided as well.
- The response will provide authorized user for the token, if the token is valid and how many more seconds the token is valid. If there was an error occurred while validating the token, it can be sent as the error message.