add user register/login form and authentication

This commit is contained in:
TimmensOne
2023-03-27 15:29:49 +02:00
parent 13f933e0b5
commit 4752b23f35
10 changed files with 216 additions and 52 deletions

View File

@@ -8,7 +8,10 @@
<body>
<nav>
<ul>
<li><a href="/">Home</a></li>
<li><a href="/home">Home</a></li>
<li><a href="/register">Register</a></li>
<li><a href="/login">Login</a></li>
<li>Logout</li>
</ul>
</nav>
<main>

View File

@@ -0,0 +1,25 @@
@extends('layout')
@section('content')
<h1>Login Form</h1>
<form method="POST" action="/users/authenticate">
@csrf
<label for="rz_username">RZ-Username:</label>
<input type="text" id="rz_username" name="rz_username" value="{{ old('device_id') }}" required>
@error('rz_username')
<p>{{ $message }}</p>
@enderror
<br />
<label for="hashed_password">Password:</label>
<input type="password" id="hashed_password" name="password" required>
@error('hashed_password')
<p>{{ $message }}</p>
@enderror
<br />
<input type="submit" value="Login">
<div>
<p>Don't have an account?</p>
<a href="/register">Register</a>
</div>
</form>
@endsection

View File

@@ -0,0 +1,43 @@
@extends('layout')
@section('content')
<h1>Registration Form</h1>
<form method="POST" action="/users">
@csrf
<label for="rz_username">RZ-Username:</label>
<input type="text" id="rz_username" name="rz_username" value="{{old('device_id')}}" required>
@error('rz_username')
<p>{{$message}}</p>
@enderror
<br/>
<label for="full_name">Full Name:</label>
<input type="text" id="full_name" name="full_name" value="{{old('device_id')}}" required>
@error('full_name')
<p>{{$message}}</p>
@enderror
<br/>
<label for="organisation_unit">Organisation Unit:</label>
<input type="text" id="organisation_unit" name="organisation_unit" value="{{old('device_id')}}" required>
@error('organisation_unit')
<p>{{$message}}</p>
@enderror
<br/>
<label for="password">Password:</label>
<input type="password" id="password" name="password" required>
@error('password')
<p>{{$message}}</p>
@enderror
<br/>
{{-- <label for="password_confirm">Confirm Password:</label>
<input type="password" id="password_confirmation" name="password_confirm" required><
@error('password_confirmation')
<p>{{$message}}</p>
@enderror
<br/> --}}
<input type="submit" value="Register">
<div>
<p>Already have an account?</p>
<a href="/login">Login</a>
</div>
</form>
@endsection