This site contains the documentation that is relevant to older WSO2 product versions and offerings.
For the latest WSO2 documentation, visit https://wso2.com/documentation/.

Working with Users in CodePlex



Overview

The following operations allow you to work with Users in CodePlex. Click an operation name to see details on how to use it.

For a sample proxy service that illustrates how to work with Users, see Sample configuration.

OperationDescription
getUserGet publicly available user details.
getAuthenticatedUserGet authenticated user details.

Operation details

This section provides the details on each operation related to Users in CodePlex.

  Get User

getUser
<codeplex.getUser>
    <user>keizer</user>
</codeplex.getUser>
Properties
  • user          : The name of the user.
Sample request

Following is a sample REST/JSON request that can be handled by the getUser operation.

Sample Request for getUser
{
"user":"pumudu88"
}

Get Authenticated User

getAuthenticatedUser
<codeplex.getAuthenticatedUser/>
Properties
  • clientId           : Client Id of the CodePlex app.
  • clientSecret   : Client secret of the CodePlex.
  • refreshToken : Refresh token acquired from codeplex OAuth.
Sample request

Following is a sample REST/JSON request that can be handled by the getAuthenticatedUser operation.

Sample Request for getAuthenticatedUser
{
"clientId":"e2ca3fc77e334c679f0c5c50257f9f37",
"clientSecret":"44c635345fbd408d96e675b0aaf13343",
"refreshToken":"L4Eo!IAAAAL3yP6zFRfsriup7jYcQThecBNIpHJ4UJFfYfGKDP2MNsQAAAAHxh0bbfEjjP7RDQBsRrELlW6cZDe4sGcT5jp3jNGxSkmwUZya3qDhgcPVxOyIuj-SC0fhdc5LP8xIqOWqR1SjiDa9d29uvopFxv-da14X2i_QByD1XCKPUHie04VKVphk_q0ta9AjsXc9MrUR9a6O24U_Da9srHendD0TJJKfygjHgYvFzkO3KIcoHmG2abPHybkBOBQHyltaHJwfESYohqHqRhL_FwJfnSRJjrzq8dl"
}

Sample configuration

Following is a sample proxy service that illustrates how to connect to CodePlex to use the getUser operation. The sample request for this proxy can be found in getUser sample request.

Sample Proxy
<proxy xmlns="http://ws.apache.org/ns/synapse"
       name="codeplexGetUserProxy"
       transports="https,http"
       statistics="disable"
       trace="disable"
       startOnLoad="true">
    <target>
        <inSequence>
            <property name="user" expression="json-eval($.user)"/>
            <codeplex.getUser>
                <user>{$ctx:user}</user>
            </codeplex.getUser>
            <respond/>
        </inSequence>
        <outSequence>
            <send/>
        </outSequence>
    </target>
    <description/>
</proxy>