validateAuthKey($password); } /** * Implemented for Oauth2 Interface */ public function getUserDetails($openId) { $clientUser = static::findByOpenId($openId); return ['user_id' => $clientUser->getId()]; } /** @inheritdoc */ public static function findIdentityByAccessToken($token, $type = null) { $q = static::find(); $q->select("client_user.*") ->from("oauth_access_tokens") ->leftJoin("client_user", 'client_user.id = oauth_access_tokens.user_id') ->where(['oauth_access_tokens.access_token'=>$token]); $identity = $q->one(); return $identity; } }