Last active
May 25, 2016 14:29
-
-
Save robotdan/abdf7f1e457e7ad4fd26a7856b5823f1 to your computer and use it in GitHub Desktop.
PassportClient Code Snippets
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* Authenticate a User */ | |
ClientResponse<LoginResponse, Errors> response = client.Login( | |
new LoginRequest(new Guid("00000000-0000-0000-0000-00000000002a"), "[email protected]", null, "secret"), null); | |
User user = response.successResponse.user; | |
/* Retrieve User by Email Address */ | |
ClientResponse<UserResponse, Errors> response = client.RetrieveUserByEmail("[email protected]"); | |
User user = response.successResponse.user; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* Authenticate a User */ | |
ClientResponse<UserResponse, Errors> response = client.login( | |
new LoginRequest(UUID.fromString("00000000-0000-0000-0000-00000000002a"), "[email protected]", null, "secret"), null); | |
User user = response.successResponse.user; | |
/* Retrieve User by Email Address */ | |
ClientResponse<UserResponse, Errors> response = client.retrieveUserByEmail("[email protected]"); | |
User user = response.successResponse.user; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Authenticate a User | |
client.login({ | |
'applicationId': '00000000-0000-0000-0000-00000000002a', | |
'email': '[email protected]', | |
'password', 'secret' | |
}).then((clientResponse) => { | |
var user = clientResponse.successResponse.user; | |
// ... | |
}); | |
// Retrieve User by Email Address | |
client.retrieveUserByEmail('[email protected]').then((clientResponse) => { | |
var user = clientResponse.successResponse.user; | |
// ... | |
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* Authenticate a User */ | |
$response = client->login( | |
["applicationId" => "00000000-0000-0000-0000-00000000002a", "email" => "[email protected]", "password" => "secret"] | |
); | |
$user = $response->successResponse->user; | |
/* Retrieve User by Email Address */ | |
$response = client->retrieveUserByEmail("[email protected]"); | |
$user = $response->successResponse->user; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Authentication | |
response = client.login({ | |
'applicationId': '00000000-0000-0000-0000-00000000002a', | |
'email': '[email protected]', | |
'password', 'secret' | |
}) | |
user = response.success_response.user | |
# Retrieve User by Email Address | |
response = client.retrieve_user_by_email('[email protected]') | |
user = response.success_response.user |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment