Last major update: 25.08.2020
- Что такое авторизация/аутентификация
- Где хранить токены
- Как ставить куки ?
- Процесс логина
- Процесс рефреш токенов
- Кража токенов/Механизм контроля токенов
| module Module1 where | |
| import Control.Monad.Reader | |
| data Config = Config { arg :: Int } | |
| initialize :: IO Config | |
| initialize = do | |
| n <- getLine | |
| return $ Config (read n) |
| /* ============================================================= | |
| * bootstrap-typeahead.js v2.1.1 | |
| * http://twitter.github.com/bootstrap/javascript.html#typeahead | |
| * ============================================================= | |
| * Copyright 2012 Twitter, Inc. | |
| * | |
| * Licensed under the Apache License, Version 2.0 (the "License"); | |
| * you may not use this file except in compliance with the License. | |
| * You may obtain a copy of the License at | |
| * |
| #include <stdio.h> | |
| #include <stdlib.h> | |
| #include <string.h> | |
| const int infinity = 2147483647; | |
| struct edge_t { | |
| int v1; | |
| int v2; | |
| int cost; |
| #!/bin/sh | |
| # Check if an IP address is listed on one of the following blacklists | |
| # The format is chosen to make it easy to add or delete | |
| # The shell will strip multiple whitespace | |
| BLISTS=" | |
| b.barracudacentral.org | |
| bb.barracudacentral.org | |
| bl.deadbeef.com | |
| bl.mailspike.net |
| //utf8 to 1251 converter (1 byte format, RU/EN support only + any other symbols) by drgluck | |
| function utf8_decode (aa) { | |
| var bb = '', c = 0; | |
| for (var i = 0; i < aa.length; i++) { | |
| c = aa.charCodeAt(i); | |
| if (c > 127) { | |
| if (c > 1024) { | |
| if (c == 1025) { | |
| c = 1016; | |
| } else if (c == 1105) { |
| #!/bin/sh | |
| while read count ip | |
| do | |
| test $count -gt 100 && echo " ipfw add deny all from $ip to me" | |
| done |
| #!/bin/bash | |
| PORT=6432 | |
| # Create a ramfs | |
| if [ -f /tmp/pg_on_ram ] | |
| then | |
| echo "/tmp/pg_on_ram already exists" | |
| exit 1 | |
| fi |
| <?php | |
| if ($argc < 2) { | |
| die('Usage: php extdoc.php <extension_name>' . PHP_EOL); | |
| } | |
| $extension = $argv[1]; | |
| $keywords = array('__halt_compiler', 'abstract', 'and', 'array', 'as', 'break', 'callable', 'case', 'catch', | |
| 'class', 'clone', 'const', 'continue', 'declare', 'default', 'die', 'do', 'echo', 'else', 'elseif', 'empty', | |
| 'enddeclare', 'endfor', 'endforeach', 'endif', 'endswitch', 'endwhile', 'eval', 'exit', 'extends', 'final', | |
| 'for', 'foreach', 'function', 'global', 'goto', 'if', 'implements', 'include', 'include_once', 'instanceof', |
| cabal install scotty | |
| cabal install aeson | |
| runhaskell server.hs | |
| curl -X POST -d '{"jsonrpc":"2.0", "method":"Calc.Add", "params":[10,50], "id":"abc"}' http://localhost:3000/api |