Last major update: 25.08.2020
- Что такое авторизация/аутентификация
- Где хранить токены
- Как ставить куки ?
- Процесс логина
- Процесс рефреш токенов
- Кража токенов/Механизм контроля токенов
| /* | |
| Copyright 2017 Hidetake Iwata | |
| 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 | |
| http://www.apache.org/licenses/LICENSE-2.0 | |
| Unless required by applicable law or agreed to in writing, software |
Syntax: cat <filename> | jq -c '.[] | select( .<key> | contains("<value>"))'
Example: To get json record having _id equal 611
cat my.json | jq -c '.[] | select( ._id | contains(611))'Remember: if JSON value has no double quotes (eg. for numeric) to do not supply in filter i.e. in contains(611)
| ssh-keygen -t rsa -b 4096 -m PEM -f jwtRS256.key | |
| # Don't add passphrase | |
| openssl rsa -in jwtRS256.key -pubout -outform PEM -out jwtRS256.key.pub | |
| cat jwtRS256.key | |
| cat jwtRS256.key.pub |
| // get status code | |
| HttpClient client = HttpClientBuilder.create().build(); | |
| HttpResponse response = client.execute(new HttpGet(SAMPLE_URL)); | |
| int statusCode = response.getStatusLine().getStatusCode(); | |
| assertThat(statusCode, equalTo(HttpStatus.SC_OK)); | |
| // set timeout | |
| // !!the Connection Timeout (http.connection.timeout) – the time to establish the connection with the remote host | |
| // !!the Socket Timeout (http.socket.timeout) – the time waiting for data – after the connection was established; maximum time of inactivity between two data packets | |
| // the Connection Manager Timeout (http.connection- manager.timeout) – the time to wait for a connection from the connection manager/pool |
| #!/bin/bash | |
| # Cisco Anyconnect CSD wrapper for OpenConnect | |
| # Enter your vpn host here | |
| CSD_HOSTNAME= | |
| if [[ -z ${CSD_HOSTNAME} ]] | |
| then | |
| echo "Define CSD_HOSTNAME with vpn-host in script text. Exiting." | |
| exit 1 | |
| fi |
| <html> | |
| <body> | |
| <!-- load combined svg file (with symbols) into body--> | |
| <script> | |
| (function (doc) { | |
| var scripts = doc.getElementsByTagName('script') | |
| var script = scripts[scripts.length - 1] | |
| var xhr = new XMLHttpRequest() | |
| xhr.onload = function () { |
| // Created by Max Luster (@maxluster) | |
| // Usage instructions at https://bugsnag.com/blog/responsive-typography-with-chained-media-queries | |
| // Requires SASS >= 3.3 | |
| // Enhanced by Breakpoint 2.4.x and Compass 1.0 (alpha) | |
| // For SASS 3.2.x support, use https://gist.github.com/maxluster/c9ecc6e4a6770e507c2c | |
| // Provides a simplified syntax for chaining media queries across named or numeric breakpoints | |
| @mixin responsive($properties, $default-value, $responsive-values){ | |
| // No named breakpoints by default |
| import static java.time.Month.*; | |
| import java.time.LocalDate; | |
| import java.time.MonthDay; | |
| import java.time.format.DateTimeFormatter; | |
| import javafx.application.Application; | |
| import javafx.beans.binding.Bindings; | |
| import javafx.beans.property.ObjectProperty; |
| <!DOCTYPE html> | |
| <html ng-app> | |
| <head> | |
| <title>Example</title> | |
| </head> | |
| <body> | |
| <nav class="main-nav" data-main-menu data-root="index"></nav> | |
| <script type="text/javascript" src="angular.js"></script> |