Enviar pesquisa
Carregar
2018-06-06 @nuxtjs/auth with Django Rest Framework
•
2 gostaram
•
2,651 visualizações
Ryo Nagaoka
Seguir
Docker/Nuxt/Django構成でプロダクトを作った際の知見(Vuetifyと@nuxtjs/authを利用)
Leia menos
Leia mais
Tecnologia
Denunciar
Compartilhar
Denunciar
Compartilhar
1 de 12
Baixar agora
Baixar para ler offline
Recomendados
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
Recomendados
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
Mais conteúdo relacionado
Mais procurados
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
Mais procurados
(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)
Semelhante a 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
Semelhante a 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
Último
Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...
Enterprise Knowledge
08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men
Delhi Call girls
The Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptx
Malak Abu Hammad
Boost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivity
Principled Technologies
08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men
Delhi Call girls
Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024
The Digital Insurer
Breaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path Mount
Puma Security, LLC
CNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of Service
giselly40
A Year of the Servo Reboot: Where Are We Now?
A Year of the Servo Reboot: Where Are We Now?
Igalia
🐬 The future of MySQL is Postgres 🐘
🐬 The future of MySQL is Postgres 🐘
RTylerCroy
Presentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreter
naman860154
How to convert PDF to text with Nanonets
How to convert PDF to text with Nanonets
naman860154
Exploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone Processors
debabhi2
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc
What Are The Drone Anti-jamming Systems Technology?
What Are The Drone Anti-jamming Systems Technology?
Antenna Manufacturer Coco
Factors to Consider When Choosing Accounts Payable Services Providers.pptx
Factors to Consider When Choosing Accounts Payable Services Providers.pptx
Katpro Technologies
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Miguel Araújo
Scaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organization
Radu Cotescu
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
HampshireHUG
Slack Application Development 101 Slides
Slack Application Development 101 Slides
praypatel2
Último
(20)
Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...
08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men
The Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptx
Boost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivity
08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men
Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024
Breaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path Mount
CNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of Service
A Year of the Servo Reboot: Where Are We Now?
A Year of the Servo Reboot: Where Are We Now?
🐬 The future of MySQL is Postgres 🐘
🐬 The future of MySQL is Postgres 🐘
Presentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreter
How to convert PDF to text with Nanonets
How to convert PDF to text with Nanonets
Exploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone Processors
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
What Are The Drone Anti-jamming Systems Technology?
What Are The Drone Anti-jamming Systems Technology?
Factors to Consider When Choosing Accounts Payable Services Providers.pptx
Factors to Consider When Choosing Accounts Payable Services Providers.pptx
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Scaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organization
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
Slack Application Development 101 Slides
Slack Application Development 101 Slides
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.
▸ ▸ ▸ ▸
Baixar agora