​
var client = new CodeMashClient(apiKey, projectId);var membershipService = new CodeMashMembershipService(client);​await membershipService.AuthenticateCredentialsAsync("test@email.com","password123");
​
use Codemash\CodemashClient;use Codemash\CodemashAuth;​class CodemashService{protected CodemashAuth $codemashAuth;​public function __construct(){$secretKey = '{YOUR_SECRET_KEY}';$projectId = '{YOUR_PROJECT_ID}';​$client = new CodemashClient($secretKey, $projectId);$this->codemashAuth = new CodemashAuth($client);}​public function login(){$responseData = $codemashAuth->authenticate(['userName' => 'test@email.com','password' => 'password123',]);}}
​
​
var client = new CodeMashClient(apiKey, projectId);var membershipService = new CodeMashMembershipService(client);​await membershipService.LogoutAsync("{BEARER_TOKEN}");
​
use Codemash\CodemashClient;use Codemash\CodemashAuth;​class CodemashService{protected CodemashAuth $codemashAuth;​public function __construct(){$secretKey = '{YOUR_SECRET_KEY}';$projectId = '{YOUR_PROJECT_ID}';​$client = new CodemashClient($secretKey, $projectId);$this->codemashAuth = new CodemashAuth($client);}​public function logout(){$responseData = $this->codemashAuth->logout(['bearerToken' => '{BEARER_TOKEN},]);}}
​
var client = new CodeMashClient(apiKey, projectId);var membershipService = new CodeMashMembershipService(client);​await membershipService.AuthenticateCredentialsAsync("test@email.com","password123");
​
use Codemash\CodemashClient;use Codemash\CodemashAuth;​class CodemashService{protected CodemashAuth $codemashAuth;​public function __construct(){$secretKey = '{YOUR_SECRET_KEY}';$projectId = '{YOUR_PROJECT_ID}';​$client = new CodemashClient($secretKey, $projectId);$this->codemashAuth = new CodemashAuth($client);}​public function isAuthenticated(){$responseData = $this->codemashAuth->checkAuth();}}