Add nami login
This commit is contained in:
parent
793a26f4fb
commit
7cfe27ac57
|
@ -4,7 +4,7 @@ namespace App\Http\Controllers\Auth;
|
|||
|
||||
use App\Http\Controllers\Controller;
|
||||
use App\Providers\RouteServiceProvider;
|
||||
use Illuminate\Foundation\Auth\AuthenticatesUsers;
|
||||
use Zoomyboy\LaravelNami\AuthenticatesNamiUsers;
|
||||
|
||||
class LoginController extends Controller
|
||||
{
|
||||
|
@ -19,7 +19,7 @@ class LoginController extends Controller
|
|||
|
|
||||
*/
|
||||
|
||||
use AuthenticatesUsers;
|
||||
use AuthenticatesNamiUsers;
|
||||
|
||||
/**
|
||||
* Where to redirect users after login.
|
||||
|
|
|
@ -21,7 +21,7 @@ class RouteServiceProvider extends ServiceProvider
|
|||
*
|
||||
* @var string
|
||||
*/
|
||||
public const HOME = '/home';
|
||||
public const HOME = '/';
|
||||
|
||||
/**
|
||||
* Define your route model bindings, pattern filters, etc.
|
||||
|
|
31
app/User.php
31
app/User.php
|
@ -3,37 +3,10 @@
|
|||
namespace App;
|
||||
|
||||
use Illuminate\Contracts\Auth\MustVerifyEmail;
|
||||
use Illuminate\Foundation\Auth\User as Authenticatable;
|
||||
use Zoomyboy\LaravelNami\NamiUser as Authenticatable;
|
||||
use Illuminate\Notifications\Notifiable;
|
||||
|
||||
class User extends Authenticatable
|
||||
{
|
||||
use Notifiable;
|
||||
|
||||
/**
|
||||
* The attributes that are mass assignable.
|
||||
*
|
||||
* @var array
|
||||
*/
|
||||
protected $fillable = [
|
||||
'name', 'email', 'password',
|
||||
];
|
||||
|
||||
/**
|
||||
* The attributes that should be hidden for arrays.
|
||||
*
|
||||
* @var array
|
||||
*/
|
||||
protected $hidden = [
|
||||
'password', 'remember_token',
|
||||
];
|
||||
|
||||
/**
|
||||
* The attributes that should be cast to native types.
|
||||
*
|
||||
* @var array
|
||||
*/
|
||||
protected $casts = [
|
||||
'email_verified_at' => 'datetime',
|
||||
];
|
||||
|
||||
}
|
||||
|
|
|
@ -6,6 +6,9 @@
|
|||
"framework",
|
||||
"laravel"
|
||||
],
|
||||
"repositories": [
|
||||
{ "type": "path", "url": "./packages/laravel-nami", "options": {"symlink": true} }
|
||||
],
|
||||
"license": "MIT",
|
||||
"require": {
|
||||
"php": "^7.2.5",
|
||||
|
@ -16,7 +19,8 @@
|
|||
"laravel/framework": "^7.0",
|
||||
"laravel/tinker": "^2.0",
|
||||
"laravel/ui": "^2.0",
|
||||
"spatie/laravel-medialibrary": "^7.19"
|
||||
"spatie/laravel-medialibrary": "^7.19",
|
||||
"zoomyboy/laravel-nami": "dev-master"
|
||||
},
|
||||
"require-dev": {
|
||||
"facade/ignition": "^2.0",
|
||||
|
|
|
@ -4,7 +4,7 @@
|
|||
"Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies",
|
||||
"This file is @generated automatically"
|
||||
],
|
||||
"content-hash": "d3a7d51481df2c886f69c3071572c278",
|
||||
"content-hash": "62db182c80f51832cfe1d9cef34a9063",
|
||||
"packages": [
|
||||
{
|
||||
"name": "asm89/stack-cors",
|
||||
|
@ -1571,16 +1571,16 @@
|
|||
},
|
||||
{
|
||||
"name": "nikic/php-parser",
|
||||
"version": "v4.3.0",
|
||||
"version": "v4.4.0",
|
||||
"source": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/nikic/PHP-Parser.git",
|
||||
"reference": "9a9981c347c5c49d6dfe5cf826bb882b824080dc"
|
||||
"reference": "bd43ec7152eaaab3bd8c6d0aa95ceeb1df8ee120"
|
||||
},
|
||||
"dist": {
|
||||
"type": "zip",
|
||||
"url": "https://api.github.com/repos/nikic/PHP-Parser/zipball/9a9981c347c5c49d6dfe5cf826bb882b824080dc",
|
||||
"reference": "9a9981c347c5c49d6dfe5cf826bb882b824080dc",
|
||||
"url": "https://api.github.com/repos/nikic/PHP-Parser/zipball/bd43ec7152eaaab3bd8c6d0aa95ceeb1df8ee120",
|
||||
"reference": "bd43ec7152eaaab3bd8c6d0aa95ceeb1df8ee120",
|
||||
"shasum": ""
|
||||
},
|
||||
"require": {
|
||||
|
@ -1619,7 +1619,7 @@
|
|||
"parser",
|
||||
"php"
|
||||
],
|
||||
"time": "2019-11-08T13:50:10+00:00"
|
||||
"time": "2020-04-10T16:34:50+00:00"
|
||||
},
|
||||
{
|
||||
"name": "opis/closure",
|
||||
|
@ -4384,6 +4384,38 @@
|
|||
}
|
||||
],
|
||||
"time": "2020-03-13T01:23:26+00:00"
|
||||
},
|
||||
{
|
||||
"name": "zoomyboy/laravel-nami",
|
||||
"version": "dev-master",
|
||||
"dist": {
|
||||
"type": "path",
|
||||
"url": "./packages/laravel-nami",
|
||||
"reference": "ac5c544c32b21f5f6b0c281b216baa13ab2feda8"
|
||||
},
|
||||
"type": "library",
|
||||
"extra": {
|
||||
"laravel": {
|
||||
"providers": [
|
||||
"Zoomyboy\\LaravelNami\\NamiServiceProvider"
|
||||
]
|
||||
}
|
||||
},
|
||||
"autoload": {
|
||||
"psr-4": {
|
||||
"Zoomyboy\\LaravelNami\\": "src/"
|
||||
}
|
||||
},
|
||||
"authors": [
|
||||
{
|
||||
"name": "Philipp Lang",
|
||||
"email": "philipp@zoomyboy.de"
|
||||
}
|
||||
],
|
||||
"description": "Authentication provider against NaMi for Laravel",
|
||||
"transport-options": {
|
||||
"symlink": true
|
||||
}
|
||||
}
|
||||
],
|
||||
"packages-dev": [
|
||||
|
@ -6406,7 +6438,9 @@
|
|||
],
|
||||
"aliases": [],
|
||||
"minimum-stability": "dev",
|
||||
"stability-flags": [],
|
||||
"stability-flags": {
|
||||
"zoomyboy/laravel-nami": 20
|
||||
},
|
||||
"prefer-stable": true,
|
||||
"prefer-lowest": false,
|
||||
"platform": {
|
||||
|
|
|
@ -80,7 +80,7 @@ return [
|
|||
|
|
||||
*/
|
||||
|
||||
'locale' => 'en',
|
||||
'locale' => 'de',
|
||||
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
|
@ -106,7 +106,7 @@ return [
|
|||
|
|
||||
*/
|
||||
|
||||
'faker_locale' => 'en_US',
|
||||
'faker_locale' => 'de_DE',
|
||||
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
|
|
|
@ -67,8 +67,8 @@ return [
|
|||
|
||||
'providers' => [
|
||||
'users' => [
|
||||
'driver' => 'eloquent',
|
||||
'model' => App\User::class,
|
||||
'driver' => 'nami',
|
||||
'model' => \App\User::class
|
||||
],
|
||||
|
||||
// 'users' => [
|
||||
|
|
|
@ -5,6 +5,7 @@
|
|||
<wrapper
|
||||
admin-toolbar="adminToolbar"
|
||||
profile-toolbar="profileToolbar"
|
||||
search-background="bg-primary-600"
|
||||
>
|
||||
<template slot="mainnav">
|
||||
<mainnav name="main" sm></mainnav>
|
||||
|
|
|
@ -10,7 +10,7 @@
|
|||
</item>
|
||||
|
||||
<item>
|
||||
<f-password label="Gruppierungsnr" v-model="values.groupid"></f-password>
|
||||
<f-text label="Gruppierungsnummer" v-model="values.groupid"></f-text>
|
||||
</item>
|
||||
|
||||
<item>
|
||||
|
@ -28,7 +28,11 @@ export default {
|
|||
|
||||
data: function() {
|
||||
return {
|
||||
values: {}
|
||||
values: {
|
||||
mglnr: 90166,
|
||||
password: 'ibm0g',
|
||||
groupid: 100105
|
||||
}
|
||||
};
|
||||
},
|
||||
methods: {
|
||||
|
|
|
@ -0,0 +1,17 @@
|
|||
<?php
|
||||
|
||||
return [
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
| Authentication Language Lines
|
||||
|--------------------------------------------------------------------------
|
||||
|
|
||||
| The following language lines are used during authentication for various
|
||||
| messages that we need to display to the user. You are free to modify
|
||||
| these language lines according to your application's requirements.
|
||||
|
|
||||
*/
|
||||
|
||||
'failed' => 'Diese Kombination aus Zugangsdaten wurde nicht in unserer Datenbank gefunden.',
|
||||
'throttle' => 'Zu viele Loginversuche. Versuchen Sie es bitte in :seconds Sekunden nochmal.',
|
||||
];
|
|
@ -0,0 +1,17 @@
|
|||
<?php
|
||||
|
||||
return [
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
| Pagination Language Lines
|
||||
|--------------------------------------------------------------------------
|
||||
|
|
||||
| The following language lines are used by the paginator library to build
|
||||
| the simple pagination links. You are free to change them to anything
|
||||
| you want to customize your views to better match your application.
|
||||
|
|
||||
*/
|
||||
|
||||
'previous' => '« Zurück',
|
||||
'next' => 'Weiter »',
|
||||
];
|
|
@ -0,0 +1,20 @@
|
|||
<?php
|
||||
|
||||
return [
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
| Password Reminder Language Lines
|
||||
|--------------------------------------------------------------------------
|
||||
|
|
||||
| The following language lines are the default lines which match reasons
|
||||
| that are given by the password broker for a password update attempt
|
||||
| has failed, such as for an invalid token or invalid new password.
|
||||
|
|
||||
*/
|
||||
|
||||
'reset' => 'Das Passwort wurde zurückgesetzt!',
|
||||
'sent' => 'Passworterinnerung wurde gesendet!',
|
||||
'throttled' => 'Bitte warten Sie, bevor Sie es erneut versuchen.',
|
||||
'token' => 'Der Passwort-Wiederherstellungs-Schlüssel ist ungültig oder abgelaufen.',
|
||||
'user' => 'Es konnte leider kein Nutzer mit dieser E-Mail-Adresse gefunden werden.',
|
||||
];
|
|
@ -0,0 +1,181 @@
|
|||
<?php
|
||||
|
||||
return [
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
| Validation Language Lines
|
||||
|--------------------------------------------------------------------------
|
||||
|
|
||||
| The following language lines contain the default error messages used by
|
||||
| the validator class. Some of these rules have multiple versions such
|
||||
| as the size rules. Feel free to tweak each of these messages.
|
||||
|
|
||||
*/
|
||||
|
||||
'accepted' => ':attribute muss akzeptiert werden.',
|
||||
'active_url' => ':attribute ist keine gültige Internet-Adresse.',
|
||||
'after' => ':attribute muss ein Datum nach dem :date sein.',
|
||||
'after_or_equal' => ':attribute muss ein Datum nach dem :date oder gleich dem :date sein.',
|
||||
'alpha' => ':attribute darf nur aus Buchstaben bestehen.',
|
||||
'alpha_dash' => ':attribute darf nur aus Buchstaben, Zahlen, Binde- und Unterstrichen bestehen.',
|
||||
'alpha_num' => ':attribute darf nur aus Buchstaben und Zahlen bestehen.',
|
||||
'array' => ':attribute muss ein Array sein.',
|
||||
'before' => ':attribute muss ein Datum vor dem :date sein.',
|
||||
'before_or_equal' => ':attribute muss ein Datum vor dem :date oder gleich dem :date sein.',
|
||||
'between' => [
|
||||
'numeric' => ':attribute muss zwischen :min & :max liegen.',
|
||||
'file' => ':attribute muss zwischen :min & :max Kilobytes groß sein.',
|
||||
'string' => ':attribute muss zwischen :min & :max Zeichen lang sein.',
|
||||
'array' => ':attribute muss zwischen :min & :max Elemente haben.',
|
||||
],
|
||||
'boolean' => ":attribute muss entweder 'true' oder 'false' sein.",
|
||||
'confirmed' => ':attribute stimmt nicht mit der Bestätigung überein.',
|
||||
'date' => ':attribute muss ein gültiges Datum sein.',
|
||||
'date_equals' => ':attribute muss ein Datum gleich :date sein.',
|
||||
'date_format' => ':attribute entspricht nicht dem gültigen Format für :format.',
|
||||
'different' => ':attribute und :other müssen sich unterscheiden.',
|
||||
'digits' => ':attribute muss :digits Stellen haben.',
|
||||
'digits_between' => ':attribute muss zwischen :min und :max Stellen haben.',
|
||||
'dimensions' => ':attribute hat ungültige Bildabmessungen.',
|
||||
'distinct' => ':attribute beinhaltet einen bereits vorhandenen Wert.',
|
||||
'email' => ':attribute muss eine gültige E-Mail-Adresse sein.',
|
||||
'ends_with' => ':attribute muss eine der folgenden Endungen aufweisen: :values',
|
||||
'exists' => 'Der gewählte Wert für :attribute ist ungültig.',
|
||||
'file' => ':attribute muss eine Datei sein.',
|
||||
'filled' => ':attribute muss ausgefüllt sein.',
|
||||
'gt' => [
|
||||
'numeric' => ':attribute muss größer als :value sein.',
|
||||
'file' => ':attribute muss größer als :value Kilobytes sein.',
|
||||
'string' => ':attribute muss länger als :value Zeichen sein.',
|
||||
'array' => ':attribute muss mehr als :value Elemente haben.',
|
||||
],
|
||||
'gte' => [
|
||||
'numeric' => ':attribute muss größer oder gleich :value sein.',
|
||||
'file' => ':attribute muss größer oder gleich :value Kilobytes sein.',
|
||||
'string' => ':attribute muss mindestens :value Zeichen lang sein.',
|
||||
'array' => ':attribute muss mindestens :value Elemente haben.',
|
||||
],
|
||||
'image' => ':attribute muss ein Bild sein.',
|
||||
'in' => 'Der gewählte Wert für :attribute ist ungültig.',
|
||||
'in_array' => 'Der gewählte Wert für :attribute kommt nicht in :other vor.',
|
||||
'integer' => ':attribute muss eine ganze Zahl sein.',
|
||||
'ip' => ':attribute muss eine gültige IP-Adresse sein.',
|
||||
'ipv4' => ':attribute muss eine gültige IPv4-Adresse sein.',
|
||||
'ipv6' => ':attribute muss eine gültige IPv6-Adresse sein.',
|
||||
'json' => ':attribute muss ein gültiger JSON-String sein.',
|
||||
'lt' => [
|
||||
'numeric' => ':attribute muss kleiner als :value sein.',
|
||||
'file' => ':attribute muss kleiner als :value Kilobytes sein.',
|
||||
'string' => ':attribute muss kürzer als :value Zeichen sein.',
|
||||
'array' => ':attribute muss weniger als :value Elemente haben.',
|
||||
],
|
||||
'lte' => [
|
||||
'numeric' => ':attribute muss kleiner oder gleich :value sein.',
|
||||
'file' => ':attribute muss kleiner oder gleich :value Kilobytes sein.',
|
||||
'string' => ':attribute darf maximal :value Zeichen lang sein.',
|
||||
'array' => ':attribute darf maximal :value Elemente haben.',
|
||||
],
|
||||
'max' => [
|
||||
'numeric' => ':attribute darf maximal :max sein.',
|
||||
'file' => ':attribute darf maximal :max Kilobytes groß sein.',
|
||||
'string' => ':attribute darf maximal :max Zeichen haben.',
|
||||
'array' => ':attribute darf maximal :max Elemente haben.',
|
||||
],
|
||||
'mimes' => ':attribute muss den Dateityp :values haben.',
|
||||
'mimetypes' => ':attribute muss den Dateityp :values haben.',
|
||||
'min' => [
|
||||
'numeric' => ':attribute muss mindestens :min sein.',
|
||||
'file' => ':attribute muss mindestens :min Kilobytes groß sein.',
|
||||
'string' => ':attribute muss mindestens :min Zeichen lang sein.',
|
||||
'array' => ':attribute muss mindestens :min Elemente haben.',
|
||||
],
|
||||
'not_in' => 'Der gewählte Wert für :attribute ist ungültig.',
|
||||
'not_regex' => ':attribute hat ein ungültiges Format.',
|
||||
'numeric' => ':attribute muss eine Zahl sein.',
|
||||
'password' => 'Das Passwort ist falsch.',
|
||||
'present' => ':attribute muss vorhanden sein.',
|
||||
'regex' => ':attribute Format ist ungültig.',
|
||||
'required' => ':attribute muss ausgefüllt werden.',
|
||||
'required_if' => ':attribute muss ausgefüllt werden, wenn :other den Wert :value hat.',
|
||||
'required_unless' => ':attribute muss ausgefüllt werden, wenn :other nicht den Wert :values hat.',
|
||||
'required_with' => ':attribute muss ausgefüllt werden, wenn :values ausgefüllt wurde.',
|
||||
'required_with_all' => ':attribute muss ausgefüllt werden, wenn :values ausgefüllt wurde.',
|
||||
'required_without' => ':attribute muss ausgefüllt werden, wenn :values nicht ausgefüllt wurde.',
|
||||
'required_without_all' => ':attribute muss ausgefüllt werden, wenn keines der Felder :values ausgefüllt wurde.',
|
||||
'same' => ':attribute und :other müssen übereinstimmen.',
|
||||
'size' => [
|
||||
'numeric' => ':attribute muss gleich :size sein.',
|
||||
'file' => ':attribute muss :size Kilobyte groß sein.',
|
||||
'string' => ':attribute muss :size Zeichen lang sein.',
|
||||
'array' => ':attribute muss genau :size Elemente haben.',
|
||||
],
|
||||
'starts_with' => ':attribute muss mit einem der folgenden Anfänge aufweisen: :values',
|
||||
'string' => ':attribute muss ein String sein.',
|
||||
'timezone' => ':attribute muss eine gültige Zeitzone sein.',
|
||||
'unique' => ':attribute ist bereits vergeben.',
|
||||
'uploaded' => ':attribute konnte nicht hochgeladen werden.',
|
||||
'url' => ':attribute muss eine URL sein.',
|
||||
'uuid' => ':attribute muss ein UUID sein.',
|
||||
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
| Custom Validation Language Lines
|
||||
|--------------------------------------------------------------------------
|
||||
|
|
||||
| Here you may specify custom validation messages for attributes using the
|
||||
| convention "attribute.rule" to name the lines. This makes it quick to
|
||||
| specify a specific custom language line for a given attribute rule.
|
||||
|
|
||||
*/
|
||||
|
||||
'custom' => [
|
||||
'attribute-name' => [
|
||||
'rule-name' => 'custom-message',
|
||||
],
|
||||
],
|
||||
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
| Custom Validation Attributes
|
||||
|--------------------------------------------------------------------------
|
||||
|
|
||||
| The following language lines are used to swap attribute place-holders
|
||||
| with something more reader friendly such as E-Mail Address instead
|
||||
| of "email". This simply helps us make messages a little cleaner.
|
||||
|
|
||||
*/
|
||||
|
||||
'attributes' => [
|
||||
'name' => 'Name',
|
||||
'username' => 'Benutzername',
|
||||
'email' => 'E-Mail Adresse',
|
||||
'first_name' => 'Vorname',
|
||||
'last_name' => 'Nachname',
|
||||
'password' => 'Passwort',
|
||||
'password_confirmation' => 'Passwort Bestätigung',
|
||||
'city' => 'Stadt',
|
||||
'country' => 'Land',
|
||||
'address' => 'Adresse',
|
||||
'phone' => 'Telefonnummer',
|
||||
'mobile' => 'Handynummer',
|
||||
'age' => 'Alter',
|
||||
'sex' => 'Geschlecht',
|
||||
'gender' => 'Geschlecht',
|
||||
'day' => 'Tag',
|
||||
'month' => 'Monat',
|
||||
'year' => 'Jahr',
|
||||
'hour' => 'Stunde',
|
||||
'minute' => 'Minute',
|
||||
'second' => 'Sekunde',
|
||||
'title' => 'Titel',
|
||||
'content' => 'Inhalt',
|
||||
'description' => 'Beschreibung',
|
||||
'excerpt' => 'Auszug',
|
||||
'date' => 'Datum',
|
||||
'time' => 'Uhrzeit',
|
||||
'available' => 'verfügbar',
|
||||
'size' => 'Größe',
|
||||
'mglnr' => 'Mitgliesnummer',
|
||||
'groupid' => 'Gruppierungsnummer',
|
||||
],
|
||||
];
|
Loading…
Reference in New Issue