Skip to content

Instantly share code, notes, and snippets.

@reignmaker
reignmaker / tokens.md
Created August 6, 2020 14:24 — forked from zmts/tokens.md
Про токены, JSON Web Tokens (JWT), аутентификацию и авторизацию. Token-Based Authentication

Про токены, JSON Web Tokens (JWT), аутентификацию и авторизацию. Token-Based Authentication

Last major update: 20.04.2020

  • Что такое авторизация/аутентификация
  • Где хранить токены
  • Как ставить куки ?
  • Процесс логина
  • Процесс рефреш токенов
  • Кража токенов/Механизм контроля токенов
#! /bin/bash
#
# Diffusion youtube avec ffmpeg
# Configurer youtube avec une résolution 720p. La vidéo n'est pas scalée.
VBR="2500k" # Bitrate de la vidéo en sortie
FPS="30" # FPS de la vidéo en sortie
QUAL="medium" # Preset de qualité FFMPEG
YOUTUBE_URL="rtmp://a.rtmp.youtube.com/live2" # URL de base RTMP youtube
/*
* Inspired by: http://stackoverflow.com/questions/4360060/video-streaming-with-html-5-via-node-js
*/
var http = require('http'),
fs = require('fs'),
util = require('util');
http.createServer(function (req, res) {
var path = 'video.mp4';
@reignmaker
reignmaker / gist:3003837
Created June 27, 2012 12:39
omniauth-google-oauth2 trace log
/home/reign/.rvm/rubies/ruby-1.9.3-p194/lib/ruby/1.9.1/net/http.rb:762:in `initialize'
/home/reign/.rvm/rubies/ruby-1.9.3-p194/lib/ruby/1.9.1/net/http.rb:762:in `open'
/home/reign/.rvm/rubies/ruby-1.9.3-p194/lib/ruby/1.9.1/net/http.rb:762:in `block in connect'
/home/reign/.rvm/rubies/ruby-1.9.3-p194/lib/ruby/1.9.1/timeout.rb:54:in `timeout'
/home/reign/.rvm/rubies/ruby-1.9.3-p194/lib/ruby/1.9.1/timeout.rb:99:in `timeout'
/home/reign/.rvm/rubies/ruby-1.9.3-p194/lib/ruby/1.9.1/net/http.rb:762:in `connect'
/home/reign/.rvm/rubies/ruby-1.9.3-p194/lib/ruby/1.9.1/net/http.rb:755:in `do_start'
/home/reign/.rvm/rubies/ruby-1.9.3-p194/lib/ruby/1.9.1/net/http.rb:744:in `start'
/home/reign/.rvm/rubies/ruby-1.9.3-p194/lib/ruby/1.9.1/net/http.rb:1284:in `request'
/gems/newrelic_rpm-3.4.0/lib/new_relic/agent/instrumentation/net.rb:22:in `block in request_with_newrelic_trace'
<%= semantic_form_for user do |f| %>
<%= f.inputs "User" do %>
<%= f.input :name %>
<%= f.input :email %>
<label for="change_password" class="checkbox">
<input type="checkbox" name="change_password" id="change_password">
Change password?
</label>
<%= f.input :password %>
<%= f.input :password_confirmation %>