Coder Social home page Coder Social logo

kullanicigirissistemi's Introduction

KullaniciGirisSistemi

Session kavramını anlamak için yaptığım uygulama

Controllers

  • AuthController:

    • Login(Get): Kullanıcı girişi sayfasını açar.
    • Login(Post): Girilen Kullanıcıyı kontrol eder, Sessionda oluşturulmuş olan kullanıcılar listesinde girilen kullanıcıyı arar, var ise CurrentUser'a girilen kullanıcıyı atar ve oturum açılmış olur.
    • Logout: Sessiondaki currentUser'ı siler. Böylelikle mevcut kullanıcı olmadığından oturum kapatılmış olur.
  • HomeController: Içerisinde Index ve private actionları var. index actionu eğer kullanıcı girişi yapılmamışsa ( session'da currentUser yok ise ) AuthController'ın login actionuna yönlendiriyor. Sessionda currentUser var ise modele atıp Index view'ini açıyor.

  • InitController: Runtime da kullanıcı oluşturmak için oluşturduk. İçerisinde sadece index action'u var. Database yerine kullanıcıları sessiona atadığımız yer burası. Home controller'in index action'una yönlendiriyor.

Views

  • Auth -> login: Kullanıcı adı ve parola girişi yapılıyor, girilen kullanıcı bulunamazsa viewbag ile gelen kullanıcı bulunamadı hatasını label etiketine yazar

  • Home -> Index'te Mevcut kullanıcı adını ve şifreyi gösteriyor. Bu bilgiler model aracılığıyla geliyor. Auth controller'ın logout action'una yönlendiren bir buton var.

kullanicigirissistemi's People

Contributors

mustafacelal avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.