Soumettre la recherche
Mettre en ligne
2018-06-06 @nuxtjs/auth with Django Rest Framework
•
2 j'aime
•
2,651 vues
Ryo Nagaoka
Suivre
Docker/Nuxt/Django構成でプロダクトを作った際の知見(Vuetifyと@nuxtjs/authを利用)
Lire moins
Lire la suite
Technologie
Signaler
Partager
Signaler
Partager
1 sur 12
Télécharger maintenant
Télécharger pour lire hors ligne
Recommandé
Simple php backdoor_by_dk
Simple php backdoor_by_dk
Stan Adrian
Asynchronous PHP and Real-time Messaging
Asynchronous PHP and Real-time Messaging
Steve Rhoades
Asynchronous I/O in PHP
Asynchronous I/O in PHP
Thomas Weinert
PuppetCamp SEA @ Blk 71 - Nagios in under 10 mins with Puppet
PuppetCamp SEA @ Blk 71 - Nagios in under 10 mins with Puppet
Walter Heck
PuppetCamp SEA @ Blk 71 - Nagios in under 10 mins with Puppet
PuppetCamp SEA @ Blk 71 - Nagios in under 10 mins with Puppet
OlinData
React PHP: the NodeJS challenger
React PHP: the NodeJS challenger
vanphp
How to stand on the shoulders of giants
How to stand on the shoulders of giants
Ian Barber
The promise of asynchronous PHP
The promise of asynchronous PHP
Wim Godden
Recommandé
Simple php backdoor_by_dk
Simple php backdoor_by_dk
Stan Adrian
Asynchronous PHP and Real-time Messaging
Asynchronous PHP and Real-time Messaging
Steve Rhoades
Asynchronous I/O in PHP
Asynchronous I/O in PHP
Thomas Weinert
PuppetCamp SEA @ Blk 71 - Nagios in under 10 mins with Puppet
PuppetCamp SEA @ Blk 71 - Nagios in under 10 mins with Puppet
Walter Heck
PuppetCamp SEA @ Blk 71 - Nagios in under 10 mins with Puppet
PuppetCamp SEA @ Blk 71 - Nagios in under 10 mins with Puppet
OlinData
React PHP: the NodeJS challenger
React PHP: the NodeJS challenger
vanphp
How to stand on the shoulders of giants
How to stand on the shoulders of giants
Ian Barber
The promise of asynchronous PHP
The promise of asynchronous PHP
Wim Godden
The promise of asynchronous php
The promise of asynchronous php
Wim Godden
HTTP Caching and PHP
HTTP Caching and PHP
David de Boer
ZeroMQ Is The Answer
ZeroMQ Is The Answer
Ian Barber
Bash Scripting Workshop
Bash Scripting Workshop
Ahmed Magdy Ezzeldin, MSc.
ZeroMQ Is The Answer: DPC 11 Version
ZeroMQ Is The Answer: DPC 11 Version
Ian Barber
Scaling antispam solutions with Puppet
Scaling antispam solutions with Puppet
Giovanni Bechis
PuppetDB, Puppet Explorer and puppetdbquery
PuppetDB, Puppet Explorer and puppetdbquery
Puppet
Caching and tuning fun for high scalability
Caching and tuning fun for high scalability
Wim Godden
Charla EHU Noviembre 2014 - Desarrollo Web
Charla EHU Noviembre 2014 - Desarrollo Web
Mikel Torres Ugarte
Puppet Camp 2012
Puppet Camp 2012
Server Density
ZeroMQ: Messaging Made Simple
ZeroMQ: Messaging Made Simple
Ian Barber
Unfiltered Unveiled
Unfiltered Unveiled
Wilfred Springer
Haskell Packageのdeb化
Haskell Packageのdeb化
Kiwamu Okabe
More than syntax
More than syntax
Wooga
Memory Management in WordPress
Memory Management in WordPress
Konstantin Kovshenin
Parsing JSON with a single regex
Parsing JSON with a single regex
brian d foy
お題でGroovyプログラミング: Part A
お題でGroovyプログラミング: Part A
Kazuchika Sekiya
Absolute Beginners Guide to Puppet Through Types - PuppetConf 2014
Absolute Beginners Guide to Puppet Through Types - PuppetConf 2014
Puppet
CGI.pm - 3ло?!
CGI.pm - 3ло?!
Anatoly Sharifulin
Monitoring with Syslog and EventMachine (RailswayConf 2012)
Monitoring with Syslog and EventMachine (RailswayConf 2012)
Wooga
How to build a High Performance PSGI/Plack Server
How to build a High Performance PSGI/Plack Server
Masahiro Nagano
Nginx + PHP
Nginx + PHP
Wataru OKAMOTO
Contenu connexe
Tendances
The promise of asynchronous php
The promise of asynchronous php
Wim Godden
HTTP Caching and PHP
HTTP Caching and PHP
David de Boer
ZeroMQ Is The Answer
ZeroMQ Is The Answer
Ian Barber
Bash Scripting Workshop
Bash Scripting Workshop
Ahmed Magdy Ezzeldin, MSc.
ZeroMQ Is The Answer: DPC 11 Version
ZeroMQ Is The Answer: DPC 11 Version
Ian Barber
Scaling antispam solutions with Puppet
Scaling antispam solutions with Puppet
Giovanni Bechis
PuppetDB, Puppet Explorer and puppetdbquery
PuppetDB, Puppet Explorer and puppetdbquery
Puppet
Caching and tuning fun for high scalability
Caching and tuning fun for high scalability
Wim Godden
Charla EHU Noviembre 2014 - Desarrollo Web
Charla EHU Noviembre 2014 - Desarrollo Web
Mikel Torres Ugarte
Puppet Camp 2012
Puppet Camp 2012
Server Density
ZeroMQ: Messaging Made Simple
ZeroMQ: Messaging Made Simple
Ian Barber
Unfiltered Unveiled
Unfiltered Unveiled
Wilfred Springer
Haskell Packageのdeb化
Haskell Packageのdeb化
Kiwamu Okabe
More than syntax
More than syntax
Wooga
Memory Management in WordPress
Memory Management in WordPress
Konstantin Kovshenin
Parsing JSON with a single regex
Parsing JSON with a single regex
brian d foy
お題でGroovyプログラミング: Part A
お題でGroovyプログラミング: Part A
Kazuchika Sekiya
Absolute Beginners Guide to Puppet Through Types - PuppetConf 2014
Absolute Beginners Guide to Puppet Through Types - PuppetConf 2014
Puppet
CGI.pm - 3ло?!
CGI.pm - 3ло?!
Anatoly Sharifulin
Monitoring with Syslog and EventMachine (RailswayConf 2012)
Monitoring with Syslog and EventMachine (RailswayConf 2012)
Wooga
Tendances
(20)
The promise of asynchronous php
The promise of asynchronous php
HTTP Caching and PHP
HTTP Caching and PHP
ZeroMQ Is The Answer
ZeroMQ Is The Answer
Bash Scripting Workshop
Bash Scripting Workshop
ZeroMQ Is The Answer: DPC 11 Version
ZeroMQ Is The Answer: DPC 11 Version
Scaling antispam solutions with Puppet
Scaling antispam solutions with Puppet
PuppetDB, Puppet Explorer and puppetdbquery
PuppetDB, Puppet Explorer and puppetdbquery
Caching and tuning fun for high scalability
Caching and tuning fun for high scalability
Charla EHU Noviembre 2014 - Desarrollo Web
Charla EHU Noviembre 2014 - Desarrollo Web
Puppet Camp 2012
Puppet Camp 2012
ZeroMQ: Messaging Made Simple
ZeroMQ: Messaging Made Simple
Unfiltered Unveiled
Unfiltered Unveiled
Haskell Packageのdeb化
Haskell Packageのdeb化
More than syntax
More than syntax
Memory Management in WordPress
Memory Management in WordPress
Parsing JSON with a single regex
Parsing JSON with a single regex
お題でGroovyプログラミング: Part A
お題でGroovyプログラミング: Part A
Absolute Beginners Guide to Puppet Through Types - PuppetConf 2014
Absolute Beginners Guide to Puppet Through Types - PuppetConf 2014
CGI.pm - 3ло?!
CGI.pm - 3ло?!
Monitoring with Syslog and EventMachine (RailswayConf 2012)
Monitoring with Syslog and EventMachine (RailswayConf 2012)
Similaire à 2018-06-06 @nuxtjs/auth with Django Rest Framework
How to build a High Performance PSGI/Plack Server
How to build a High Performance PSGI/Plack Server
Masahiro Nagano
Nginx + PHP
Nginx + PHP
Wataru OKAMOTO
Kansai.pm 10周年記念 Plack/PSGI 入門
Kansai.pm 10周年記念 Plack/PSGI 入門
lestrrat
Top 10 F5 iRules to migrate to a modern load balancing platform
Top 10 F5 iRules to migrate to a modern load balancing platform
Avi Networks
Facebook的缓存系统
Facebook的缓存系统
yiditushe
4069180 Caching Performance Lessons From Facebook
4069180 Caching Performance Lessons From Facebook
guoqing75
Nko workshop - node js crud & deploy
Nko workshop - node js crud & deploy
Simon Su
服务框架: Thrift & PasteScript
服务框架: Thrift & PasteScript
Qiangning Hong
Tatsumaki
Tatsumaki
Tatsuhiko Miyagawa
feature toggles for ops
feature toggles for ops
Bram Vogelaar
Perl Web Client
Perl Web Client
Flavio Poletti
WordPress 運用を支える Perl
WordPress 運用を支える Perl
鉄次 尾形
Developing cacheable backend applications - Appdevcon 2019
Developing cacheable backend applications - Appdevcon 2019
Thijs Feryn
Frontend Servers and NGINX: What, Where and How
Frontend Servers and NGINX: What, Where and How
Ecommerce Solution Provider SysIQ
Perl web frameworks
Perl web frameworks
diego_k
Curscatalyst
Curscatalyst
Kar Juan
Plack at YAPC::NA 2010
Plack at YAPC::NA 2010
Tatsuhiko Miyagawa
PerlDancer for Perlers (FOSDEM 2011)
PerlDancer for Perlers (FOSDEM 2011)
xSawyer
AngularJS - $http & $resource Services
AngularJS - $http & $resource Services
Eyal Vardi
AMS Node Meetup December presentation Phusion Passenger
AMS Node Meetup December presentation Phusion Passenger
icemobile
Similaire à 2018-06-06 @nuxtjs/auth with Django Rest Framework
(20)
How to build a High Performance PSGI/Plack Server
How to build a High Performance PSGI/Plack Server
Nginx + PHP
Nginx + PHP
Kansai.pm 10周年記念 Plack/PSGI 入門
Kansai.pm 10周年記念 Plack/PSGI 入門
Top 10 F5 iRules to migrate to a modern load balancing platform
Top 10 F5 iRules to migrate to a modern load balancing platform
Facebook的缓存系统
Facebook的缓存系统
4069180 Caching Performance Lessons From Facebook
4069180 Caching Performance Lessons From Facebook
Nko workshop - node js crud & deploy
Nko workshop - node js crud & deploy
服务框架: Thrift & PasteScript
服务框架: Thrift & PasteScript
Tatsumaki
Tatsumaki
feature toggles for ops
feature toggles for ops
Perl Web Client
Perl Web Client
WordPress 運用を支える Perl
WordPress 運用を支える Perl
Developing cacheable backend applications - Appdevcon 2019
Developing cacheable backend applications - Appdevcon 2019
Frontend Servers and NGINX: What, Where and How
Frontend Servers and NGINX: What, Where and How
Perl web frameworks
Perl web frameworks
Curscatalyst
Curscatalyst
Plack at YAPC::NA 2010
Plack at YAPC::NA 2010
PerlDancer for Perlers (FOSDEM 2011)
PerlDancer for Perlers (FOSDEM 2011)
AngularJS - $http & $resource Services
AngularJS - $http & $resource Services
AMS Node Meetup December presentation Phusion Passenger
AMS Node Meetup December presentation Phusion Passenger
Dernier
Leverage Zilliz Serverless - Up to 50X Saving for Your Vector Storage Cost
Leverage Zilliz Serverless - Up to 50X Saving for Your Vector Storage Cost
Zilliz
DevEX - reference for building teams, processes, and platforms
DevEX - reference for building teams, processes, and platforms
Sergiu Bodiu
Are Multi-Cloud and Serverless Good or Bad?
Are Multi-Cloud and Serverless Good or Bad?
Mattias Andersson
H2O.ai CEO/Founder: Sri Ambati Keynote at Wells Fargo Day
H2O.ai CEO/Founder: Sri Ambati Keynote at Wells Fargo Day
Sri Ambati
TrustArc Webinar - How to Build Consumer Trust Through Data Privacy
TrustArc Webinar - How to Build Consumer Trust Through Data Privacy
TrustArc
Artificial intelligence in cctv survelliance.pptx
Artificial intelligence in cctv survelliance.pptx
hariprasad279825
Search Engine Optimization SEO PDF for 2024.pdf
Search Engine Optimization SEO PDF for 2024.pdf
RankYa
Story boards and shot lists for my a level piece
Story boards and shot lists for my a level piece
charlottematthew16
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptx
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptx
LoriGlavin3
Streamlining Python Development: A Guide to a Modern Project Setup
Streamlining Python Development: A Guide to a Modern Project Setup
Florian Wilhelm
Hyperautomation and AI/ML: A Strategy for Digital Transformation Success.pdf
Hyperautomation and AI/ML: A Strategy for Digital Transformation Success.pdf
Precisely
Unleash Your Potential - Namagunga Girls Coding Club
Unleash Your Potential - Namagunga Girls Coding Club
Kalema Edgar
What's New in Teams Calling, Meetings and Devices March 2024
What's New in Teams Calling, Meetings and Devices March 2024
Stephanie Beckett
The Ultimate Guide to Choosing WordPress Pros and Cons
The Ultimate Guide to Choosing WordPress Pros and Cons
Pixlogix Infotech
Nell’iperspazio con Rocket: il Framework Web di Rust!
Nell’iperspazio con Rocket: il Framework Web di Rust!
Commit University
SAP Build Work Zone - Overview L2-L3.pptx
SAP Build Work Zone - Overview L2-L3.pptx
NavinnSomaal
How to write a Business Continuity Plan
How to write a Business Continuity Plan
Databarracks
TeamStation AI System Report LATAM IT Salaries 2024
TeamStation AI System Report LATAM IT Salaries 2024
Lonnie McRorey
Developer Data Modeling Mistakes: From Postgres to NoSQL
Developer Data Modeling Mistakes: From Postgres to NoSQL
ScyllaDB
"Debugging python applications inside k8s environment", Andrii Soldatenko
"Debugging python applications inside k8s environment", Andrii Soldatenko
Fwdays
Dernier
(20)
Leverage Zilliz Serverless - Up to 50X Saving for Your Vector Storage Cost
Leverage Zilliz Serverless - Up to 50X Saving for Your Vector Storage Cost
DevEX - reference for building teams, processes, and platforms
DevEX - reference for building teams, processes, and platforms
Are Multi-Cloud and Serverless Good or Bad?
Are Multi-Cloud and Serverless Good or Bad?
H2O.ai CEO/Founder: Sri Ambati Keynote at Wells Fargo Day
H2O.ai CEO/Founder: Sri Ambati Keynote at Wells Fargo Day
TrustArc Webinar - How to Build Consumer Trust Through Data Privacy
TrustArc Webinar - How to Build Consumer Trust Through Data Privacy
Artificial intelligence in cctv survelliance.pptx
Artificial intelligence in cctv survelliance.pptx
Search Engine Optimization SEO PDF for 2024.pdf
Search Engine Optimization SEO PDF for 2024.pdf
Story boards and shot lists for my a level piece
Story boards and shot lists for my a level piece
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptx
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptx
Streamlining Python Development: A Guide to a Modern Project Setup
Streamlining Python Development: A Guide to a Modern Project Setup
Hyperautomation and AI/ML: A Strategy for Digital Transformation Success.pdf
Hyperautomation and AI/ML: A Strategy for Digital Transformation Success.pdf
Unleash Your Potential - Namagunga Girls Coding Club
Unleash Your Potential - Namagunga Girls Coding Club
What's New in Teams Calling, Meetings and Devices March 2024
What's New in Teams Calling, Meetings and Devices March 2024
The Ultimate Guide to Choosing WordPress Pros and Cons
The Ultimate Guide to Choosing WordPress Pros and Cons
Nell’iperspazio con Rocket: il Framework Web di Rust!
Nell’iperspazio con Rocket: il Framework Web di Rust!
SAP Build Work Zone - Overview L2-L3.pptx
SAP Build Work Zone - Overview L2-L3.pptx
How to write a Business Continuity Plan
How to write a Business Continuity Plan
TeamStation AI System Report LATAM IT Salaries 2024
TeamStation AI System Report LATAM IT Salaries 2024
Developer Data Modeling Mistakes: From Postgres to NoSQL
Developer Data Modeling Mistakes: From Postgres to NoSQL
"Debugging python applications inside k8s environment", Andrii Soldatenko
"Debugging python applications inside k8s environment", Andrii Soldatenko
2018-06-06 @nuxtjs/auth with Django Rest Framework
1.
2.
▸ ▸ ▸ ▸ ▸
3.
▸ ▸ ▸ ▸
4.
5.
▸ Nginx(Proxy) Django (port:8000) Nuxt (port:3000) DB port:80 /admin(Django ) /api /static(Django ) port:8000
proxy port:3000 proxy upstream django { ip_hash; server django:8000; } upstream nuxt { ip_hash; server nuxt:3000; } server { location ~ /(api|admin|static)/ { proxy_pass http://django; proxy_set_header Host $http_host; proxy_set_header X-Forwarded-Host $host; } location / { proxy_pass http://nuxt; proxy_set_header Host $http_host; proxy_set_header X-Forwarded-Host $host; } listen 80; server_name localhost; }
6.
▸ ▸ ▸ ▸ ▸ ▸
7.
▸ ▸ ▸ ▸ auth: { fetchUserOnLogin: true, strategies:
{ local: { endpoints: { login: { url: '/api/auth/token/create/', method: 'post', propertyName: 'auth_token' }, logout: { url: '/api/auth/token/destroy/', method: 'post' }, user: { url: '/api/auth/me/', propertyName: false }, }, tokenType: 'Token', tokenName: 'Authorization' } }, redirect: { login: '/login', home: '/' } },
8.
{ “email”:”***", "id":2, “username":"user2", "scope":[ "general" ] } {“auth_token”:”*****”}
9.
▸ { “email”:”***", "id":1, “username":"user1", "scope":[ “admin" ] } <div> <p>Admin Page</p> <p v-if="this.$auth.hasScope('admin')"> Secret
Area </p> </div>
10.
▸ ▸ async submit ()
{ try { await this.$auth.login({ data: this.form }) if (this.$auth.hasScope('general')) { this.$nuxt.$router.push('/general') } else if (this.$auth.hasScope('admin')) { this.$nuxt.$router.push('/admin') } } catch (e) { this.error = 'Login failed.' } }
11.
▸ ▸ ▸ ▸ ▸ ▸ ▸ ▸
12.
▸ ▸ ▸ ▸
Télécharger maintenant