Examples of AuthResponsePayload


Examples of com.force.mockoauthserver.model.AuthResponsePayload

    @Produces("application/json")
    public Response tokenHandshake(@QueryParam("code") String code, @QueryParam("grant_type") String grantType,
            @QueryParam("client_id") String clientId, @QueryParam("client_secret") String clientSecret,
            @QueryParam("redirect_uri") String redirectUri
            ) {
        AuthResponsePayload payload = new AuthResponsePayload();

        payload.setId("https://login.salesforce.com/id/00D50000000IZ3ZEAW/00550000001fg5OAAQ");

        // AccessToken aka Session-id.
        payload.setAccessToken("222");

        // This url is not being used; instead MockSecurityContextUtil overloads initializeSecurityContextFromApi; so
        // that SecurityContextUtil does not call GetUserInfoResult.
        payload.setInstanceUrl("http://localhost:9966/force-mock-oauth-server-app/oauth2");
        payload.setIssuedAt(String.valueOf(System.currentTimeMillis() / MILLISEC_PER_SEC));
        payload.setRefreshToken("333");
        payload.setSignature("555");

        return Response.ok(payload).build();
    }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.