diff --git a/backend/controllers/FingerprintController.php b/backend/controllers/FingerprintController.php
new file mode 100644
index 0000000..9fd3050
--- /dev/null
+++ b/backend/controllers/FingerprintController.php
@@ -0,0 +1,121 @@
+ [
+ 'class' => VerbFilter::className(),
+ 'actions' => [
+ 'delete' => ['post'],
+ ],
+ ],
+ ];
+ }
+
+ /**
+ * Lists all Fingerprint models.
+ * @return mixed
+ */
+ public function actionIndex()
+ {
+ $searchModel = new FingerprintSearch();
+ $dataProvider = $searchModel->search(Yii::$app->request->queryParams);
+
+ return $this->render('index', [
+ 'searchModel' => $searchModel,
+ 'dataProvider' => $dataProvider,
+ ]);
+ }
+
+ /**
+ * Displays a single Fingerprint model.
+ * @param integer $id
+ * @return mixed
+ */
+ public function actionView($id)
+ {
+ return $this->render('view', [
+ 'model' => $this->findModel($id),
+ ]);
+ }
+
+ /**
+ * Creates a new Fingerprint model.
+ * If creation is successful, the browser will be redirected to the 'view' page.
+ * @return mixed
+ */
+ public function actionCreate()
+ {
+ $model = new Fingerprint();
+
+ if ($model->load(Yii::$app->request->post()) && $model->save()) {
+ return $this->redirect(['view', 'id' => $model->id_fingerprint]);
+ } else {
+ return $this->render('create', [
+ 'model' => $model,
+ ]);
+ }
+ }
+
+ /**
+ * Updates an existing Fingerprint model.
+ * If update is successful, the browser will be redirected to the 'view' page.
+ * @param integer $id
+ * @return mixed
+ */
+ public function actionUpdate($id)
+ {
+ $model = $this->findModel($id);
+
+ if ($model->load(Yii::$app->request->post()) && $model->save()) {
+ return $this->redirect(['view', 'id' => $model->id_fingerprint]);
+ } else {
+ return $this->render('update', [
+ 'model' => $model,
+ ]);
+ }
+ }
+
+ /**
+ * Deletes an existing Fingerprint model.
+ * If deletion is successful, the browser will be redirected to the 'index' page.
+ * @param integer $id
+ * @return mixed
+ */
+ public function actionDelete($id)
+ {
+ $this->findModel($id)->delete();
+
+ return $this->redirect(['index']);
+ }
+
+ /**
+ * Finds the Fingerprint model based on its primary key value.
+ * If the model is not found, a 404 HTTP exception will be thrown.
+ * @param integer $id
+ * @return Fingerprint the loaded model
+ * @throws NotFoundHttpException if the model cannot be found
+ */
+ protected function findModel($id)
+ {
+ if (($model = Fingerprint::findOne($id)) !== null) {
+ return $model;
+ } else {
+ throw new NotFoundHttpException('The requested page does not exist.');
+ }
+ }
+}
diff --git a/backend/models/FingerprintSearch.php b/backend/models/FingerprintSearch.php
new file mode 100644
index 0000000..5fb3cec
--- /dev/null
+++ b/backend/models/FingerprintSearch.php
@@ -0,0 +1,69 @@
+ $query,
+ ]);
+
+ $this->load($params);
+
+ if (!$this->validate()) {
+ // uncomment the following line if you do not want to return any records when validation fails
+ // $query->where('0=1');
+ return $dataProvider;
+ }
+
+ $query->andFilterWhere([
+ 'id_fingerprint' => $this->id_fingerprint,
+ 'id_customer' => $this->id_customer,
+ 'created_at' => $this->created_at,
+ 'updated_at' => $this->updated_at,
+ ]);
+
+ $query->andFilterWhere(['like', 'fingerprint', $this->fingerprint]);
+
+ return $dataProvider;
+ }
+}
diff --git a/backend/views/fingerprint/_form.php b/backend/views/fingerprint/_form.php
new file mode 100644
index 0000000..7a896c5
--- /dev/null
+++ b/backend/views/fingerprint/_form.php
@@ -0,0 +1,29 @@
+
+
+
diff --git a/backend/views/fingerprint/_search.php b/backend/views/fingerprint/_search.php
new file mode 100644
index 0000000..c425c71
--- /dev/null
+++ b/backend/views/fingerprint/_search.php
@@ -0,0 +1,35 @@
+
+
+
+
+ ['index'],
+ 'method' => 'get',
+ ]); ?>
+
+ = $form->field($model, 'id_fingerprint') ?>
+
+ = $form->field($model, 'id_customer') ?>
+
+ = $form->field($model, 'fingerprint') ?>
+
+ = $form->field($model, 'created_at') ?>
+
+ = $form->field($model, 'updated_at') ?>
+
+
+ = Html::submitButton(Yii::t('common/fingerprint', 'Search'), ['class' => 'btn btn-primary']) ?>
+ = Html::resetButton(Yii::t('common/fingerprint', 'Reset'), ['class' => 'btn btn-default']) ?>
+
+
+
+
+
diff --git a/backend/views/fingerprint/create.php b/backend/views/fingerprint/create.php
new file mode 100644
index 0000000..9d36717
--- /dev/null
+++ b/backend/views/fingerprint/create.php
@@ -0,0 +1,21 @@
+title = Yii::t('common/fingerprint', 'Create Fingerprint');
+$this->params['breadcrumbs'][] = ['label' => Yii::t('common/fingerprint', 'Fingerprints'), 'url' => ['index']];
+$this->params['breadcrumbs'][] = $this->title;
+?>
+
+
+
= Html::encode($this->title) ?>
+
+ = $this->render('_form', [
+ 'model' => $model,
+ ]) ?>
+
+
diff --git a/backend/views/fingerprint/index.php b/backend/views/fingerprint/index.php
new file mode 100644
index 0000000..9f008b0
--- /dev/null
+++ b/backend/views/fingerprint/index.php
@@ -0,0 +1,38 @@
+title = Yii::t('common/fingerprint', 'Fingerprints');
+$this->params['breadcrumbs'][] = $this->title;
+?>
+
+
+
= Html::encode($this->title) ?>
+ render('_search', ['model' => $searchModel]); ?>
+
+
+ = Html::a(Yii::t('common/fingerprint', 'Create Fingerprint'), ['create'], ['class' => 'btn btn-success']) ?>
+
+
+ = GridView::widget([
+ 'dataProvider' => $dataProvider,
+ 'filterModel' => $searchModel,
+ 'columns' => [
+ ['class' => 'yii\grid\SerialColumn'],
+
+ 'id_fingerprint',
+ 'id_customer',
+ 'fingerprint:ntext',
+ 'created_at',
+ 'updated_at',
+
+ ['class' => 'yii\grid\ActionColumn'],
+ ],
+ ]); ?>
+
+
diff --git a/backend/views/fingerprint/update.php b/backend/views/fingerprint/update.php
new file mode 100644
index 0000000..d2cd23e
--- /dev/null
+++ b/backend/views/fingerprint/update.php
@@ -0,0 +1,23 @@
+title = Yii::t('common/fingerprint', 'Update {modelClass}: ', [
+ 'modelClass' => 'Fingerprint',
+]) . ' ' . $model->id_fingerprint;
+$this->params['breadcrumbs'][] = ['label' => Yii::t('common/fingerprint', 'Fingerprints'), 'url' => ['index']];
+$this->params['breadcrumbs'][] = ['label' => $model->id_fingerprint, 'url' => ['view', 'id' => $model->id_fingerprint]];
+$this->params['breadcrumbs'][] = Yii::t('common/fingerprint', 'Update');
+?>
+
+
+
= Html::encode($this->title) ?>
+
+ = $this->render('_form', [
+ 'model' => $model,
+ ]) ?>
+
+
diff --git a/backend/views/fingerprint/view.php b/backend/views/fingerprint/view.php
new file mode 100644
index 0000000..157c365
--- /dev/null
+++ b/backend/views/fingerprint/view.php
@@ -0,0 +1,39 @@
+title = $model->id_fingerprint;
+$this->params['breadcrumbs'][] = ['label' => Yii::t('common/fingerprint', 'Fingerprints'), 'url' => ['index']];
+$this->params['breadcrumbs'][] = $this->title;
+?>
+
+
+
= Html::encode($this->title) ?>
+
+
+ = Html::a(Yii::t('common/fingerprint', 'Update'), ['update', 'id' => $model->id_fingerprint], ['class' => 'btn btn-primary']) ?>
+ = Html::a(Yii::t('common/fingerprint', 'Delete'), ['delete', 'id' => $model->id_fingerprint], [
+ 'class' => 'btn btn-danger',
+ 'data' => [
+ 'confirm' => Yii::t('common/fingerprint', 'Are you sure you want to delete this item?'),
+ 'method' => 'post',
+ ],
+ ]) ?>
+
+
+ = DetailView::widget([
+ 'model' => $model,
+ 'attributes' => [
+ 'id_fingerprint',
+ 'id_customer',
+ 'fingerprint:ntext',
+ 'created_at',
+ 'updated_at',
+ ],
+ ]) ?>
+
+
diff --git a/common/models/Fingerprint.php b/common/models/Fingerprint.php
new file mode 100644
index 0000000..2a64343
--- /dev/null
+++ b/common/models/Fingerprint.php
@@ -0,0 +1,67 @@
+ TimestampBehavior::className(),
+ 'value' => function(){ return date('Y-m-d H:i:s' ); },
+ 'updatedAtAttribute' => false,
+ ]
+ ], parent::behaviors());
+ }
+
+
+ /**
+ * @inheritdoc
+ */
+ public static function tableName()
+ {
+ return 'fingerprint';
+ }
+
+ /**
+ * @inheritdoc
+ */
+ public function rules()
+ {
+ return [
+ [['id_customer'], 'integer'],
+ [['fingerprint'], 'string'],
+ [['created_at', 'updated_at'], 'required'],
+ [['created_at', 'updated_at'], 'safe']
+ ];
+ }
+
+ /**
+ * @inheritdoc
+ */
+ public function attributeLabels()
+ {
+ return [
+ 'id_fingerprint' => Yii::t('common/fingerprint', 'Id Fingerprint'),
+ 'id_customer' => Yii::t('common/fingerprint', 'Id Customer'),
+ 'fingerprint' => Yii::t('common/fingerprint', 'Fingerprint'),
+ 'created_at' => Yii::t('common/fingerprint', 'Created At'),
+ 'updated_at' => Yii::t('common/fingerprint', 'Updated At'),
+ ];
+ }
+}
diff --git a/console/migrations/m200103_104020_add_table_fingerprint.php b/console/migrations/m200103_104020_add_table_fingerprint.php
new file mode 100644
index 0000000..8e2dea6
--- /dev/null
+++ b/console/migrations/m200103_104020_add_table_fingerprint.php
@@ -0,0 +1,54 @@
+db->driverName === 'mysql') {
+ // http://stackoverflow.com/questions/766809/whats-the-difference-between-utf8-general-ci-and-utf8-unicode-ci
+ $tableOptions = 'CHARACTER SET utf8 COLLATE utf8_unicode_ci ENGINE=InnoDB';
+ }
+
+ $this->createTable('{{%fingerprint}}', [
+ 'id_fingerprint' => $this->primaryKey(),
+ 'id_customer' => $this->integer(11),
+ 'fingerprint' => $this->text(),
+ 'created_at' => $this->dateTime()->notNull(),
+ 'updated_at' => $this->dateTime()->notNull(),
+ ], $tableOptions);
+ }
+
+ /**
+ * {@inheritdoc}
+ */
+ public function safeDown()
+ {
+ echo "m200103_104020_add_table_fingerprint cannot be reverted.\n";
+
+ return false;
+ }
+
+ /*
+ // Use up()/down() to run migration code without a transaction.
+ public function up()
+ {
+
+ }
+
+ public function down()
+ {
+ echo "m200103_104020_add_table_fingerprint cannot be reverted.\n";
+
+ return false;
+ }
+ */
+}
diff --git a/console/migrations/m200106_093107_add_user_fingerprint.php b/console/migrations/m200106_093107_add_user_fingerprint.php
new file mode 100644
index 0000000..0140ad6
--- /dev/null
+++ b/console/migrations/m200106_093107_add_user_fingerprint.php
@@ -0,0 +1,52 @@
+username = 'fingerprint_system';
+ $user->email = 'fingerprint_system@rocho-net.hu';
+ $user->setPassword('Vn?y0c?DI|Ar6Kfvmf?$');
+ $user->generateAuthKey();
+ $user->save();
+
+ $role = Yii::$app->authManager->createRole('fingerprint_system');
+ Yii::$app->authManager->add($role);
+ Yii::$app->authManager->assign($role, $user->id);
+ }
+
+ /**
+ * {@inheritdoc}
+ */
+ public function safeDown()
+ {
+ echo "m200106_093107_add_user_fingerprint cannot be reverted.\n";
+
+ return false;
+ }
+
+ /*
+ // Use up()/down() to run migration code without a transaction.
+ public function up()
+ {
+
+ }
+
+ public function down()
+ {
+ echo "m200106_093107_add_user_fingerprint cannot be reverted.\n";
+
+ return false;
+ }
+ */
+}
diff --git a/rest/controllers/FingerprintController.php b/rest/controllers/FingerprintController.php
new file mode 100644
index 0000000..58a00c3
--- /dev/null
+++ b/rest/controllers/FingerprintController.php
@@ -0,0 +1,70 @@
+$idCustomer]);
+
+ $fingerPrintModel = new Fingerprint();
+ $fingerPrintModel->id_customer = $customer->id_customer;
+ $fingerPrintModel->fingerprint = $fingerPrint;
+ $fingerPrintModel->save(false);
+ }
+
+ /**
+ * @param string the sha string of the fingerprint $fingerPrint
+ * @return array the response
+ * @throws HttpException on any error
+ */
+ public function actionEnter($fingerPrint)
+ {
+
+
+ /** @var Fingerprint $fingerPrint */
+ $fingerPrint = Fingerprint::find()->andWhere(['fingerPrint' => $fingerPrint])->one();
+
+ if ( null === $fingerPrint) {
+ throw new HttpException(404, 'Not Found');
+ }
+
+ $customer = Customer::findOne($fingerPrint->id_customer);
+
+
+ if ( null === $customer) {
+ throw new HttpException(404, 'Not Found');
+ }
+
+ return
+ [
+ 'id_customer' => $customer->id_customer
+ ];
+
+ }
+
+}
diff --git a/rest/models/FingerPrintEnterForm.php b/rest/models/FingerPrintEnterForm.php
new file mode 100644
index 0000000..ae69aa3
--- /dev/null
+++ b/rest/models/FingerPrintEnterForm.php
@@ -0,0 +1,19 @@
+