Last major update: 25.08.2020
- Что такое авторизация/аутентификация
- Где хранить токены
- Как ставить куки ?
- Процесс логина
- Процесс рефреш токенов
- Кража токенов/Механизм контроля токенов
package com.javarush.test.level20.lesson10.bonus03; | |
import java.util.ArrayList; | |
import java.util.List; | |
/* Кроссворд | |
1. Дан двумерный массив, который содержит буквы английского алфавита в нижнем регистре. | |
2. Метод detectAllWords должен найти все слова из words в массиве crossword. | |
3. Элемент(startX, startY) должен соответствовать первой букве слова, элемент(endX, endY) - последней. | |
text - это само слово, располагается между начальным и конечным элементами |
questions = [ "Question1", "Question2" ] | |
results = [ "Result1", "Result" ] | |
[[answers]] | |
options = [ "Variant3", "Variant4" ] | |
scores = [ [ "3", "6", "9" ], [ "1", "3", "7" ] ] | |
[[answers]] | |
options = [ "Variant3", "Variant4" ] | |
scores = [ [ "3", "6", "9" ], [ "1", "3", "7" ] ] |
--- | |
answers: | |
- options: | |
- Variant3 | |
- Variant4 | |
scores: | |
- ["3","6","9"] | |
- ["1", "3", "7"] | |
- options: | |
- Variant3 |
cd ~/hugoblog; git add --all; git commit -m "next commit"; git push; ssh me "cd /web/yabbarov.ru/hugoblog; git pull; hugo" |
{ | |
"questions": [ | |
"Question1", | |
"Question2" | |
], | |
"answers": [ | |
{ | |
"options": [ | |
"Variant1", | |
"Variant2" |
package org.example; | |
import com.fasterxml.jackson.annotation.JsonProperty; | |
import com.fasterxml.jackson.databind.ObjectMapper; | |
import java.io.File; | |
import java.io.IOException; | |
import java.util.ArrayList; | |
import java.util.Objects; |
iptables -A INPUT -m state --state ESTABLISHED,RELATED -j ACCEPT | |
iptables -A INPUT -m state --state NEW -p tcp --dport 22 -j ACCEPT # SSH | |
iptables -A INPUT -p udp --dport 500 -j ACCEPT # for ISAKMP (handling of security associations) | |
iptables -A INPUT -p udp --dport 4500 -j ACCEPT # for NAT-T (handling of IPsec between natted devices) | |
iptables -A INPUT -p 50 -j ACCEPT # ESP - IP port 50 for ESP payload (the encrypted data packets) | |
iptables -A INPUT -j DROP | |
# Protect from trafic routing outside (WAN). Use outer interface here if any | |
iptables -A FORWARD -m state --state ESTABLISHED,RELATED -j ACCEPT | |
#iptables -A FORWARD -j REJECT |
connections { | |
rw { | |
pools = primary-pool | |
local { | |
auth = pubkey | |
certs = cert.pem | |
id = certificate_domain_name | |
} | |
remote { | |
auth = eap-mschapv2 |
package com.javarush.task.task04.task0442; | |
import java.io.BufferedReader; | |
import java.io.InputStreamReader; | |
public class Solution { | |
public static void main(String[] args) throws Exception { | |
BufferedReader reader = new BufferedReader(new InputStreamReader(System.in)); | |
int sum = 0; | |
int number = 0; |