Reputation: 196
I want to use WSO2 for sso. When i'm going to validate token code in SoapUI i'm facing with Invalid access token error. I registered and i'm redirect to this URL:
I'm using code parameter for validation: 63873a38-40c6-3240-850c-a50bf7ad8883
Here is my code in SoapUI:
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsd="http://org.apache.axis2/xsd" xmlns:xsd1="http://dto.oauth2.identity.carbon.wso2.org/xsd">
<soapenv:Header/>
<soapenv:Body>
<xsd:validate>
<!--Optional:-->
<xsd:validationReqDTO>
<!--Optional:-->
<xsd1:accessToken>
<!--Optional:-->
<xsd1:identifier>63873a38-40c6-3240-850c-a50bf7ad8883</xsd1:identifier>
<!--Optional:-->
<xsd1:tokenType>Bearer</xsd1:tokenType>
</xsd1:accessToken>
<!--Zero or more repetitions:-->
<xsd1:context>
<!--Optional:-->
<xsd1:key>?</xsd1:key>
<!--Optional:-->
<xsd1:value>?</xsd1:value>
</xsd1:context>
<!--Zero or more repetitions:-->
<xsd1:requiredClaimURIs>?</xsd1:requiredClaimURIs>
</xsd:validationReqDTO>
</xsd:validate>
</soapenv:Body>
</soapenv:Envelope>
And here is the result:
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/">
<soapenv:Body>
<ns:validateResponse xmlns:ns="http://org.apache.axis2/xsd">
<ns:return xsi:type="ax2395:OAuth2TokenValidationResponseDTO" xmlns:ax2395="http://dto.oauth2.identity.carbon.wso2.org/xsd" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<ax2395:authorizationContextToken xsi:nil="true"/>
<ax2395:authorizedUser xsi:nil="true"/>
<ax2395:errorMsg>Invalid access token</ax2395:errorMsg>
<ax2395:expiryTime>0</ax2395:expiryTime>
<ax2395:scope xsi:nil="true"/>
<ax2395:valid>false</ax2395:valid>
</ns:return>
</ns:validateResponse>
</soapenv:Body>
</soapenv:Envelope>
Would you please tell me what is wrong?
Upvotes: 0
Views: 139
Reputation: 12502
It seems you're trying to validate the authorization code. (Why are you doing that?) This service is only for validating access tokens.
Upvotes: 1