This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
vendor/ | |
composer.lock |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<VirtualHost *:80> | |
ServerName example.com | |
Redirect permanent / https://example.com/ | |
</VirtualHost> | |
<VirtualHost *:443> | |
ServerName example.com | |
DocumentRoot /var/www/html/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
require_once 'vendor/autoload.php'; | |
use \Firebase\JWT\JWT; | |
$jwt = explode(' ', $_SERVER['HTTP_AUTHORIZATION'])[1]; | |
$key = '-----BEGIN PUBLIC KEY----- | |
MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAmistH3NpQsolL6XBGeMMe0W3E67Yfc9kSe+/hlY12r2FSjb3JC0kpO8elrAGbJMRvuWI7d1RmWirhfoDOmwZoNBm0SoHuTXFOw/FKFt+opNbTmOciXg5HmbvXUnr+KSCQUx0NBwoW+LUGZLhYi5nVaidF1Ic02ttSOa9Ldlw+uYQRQABhJ9usUkrEkvlzVFtNEGOMwEAA4uqNn9gs1Jnn8P3k511/YqkH0PLpyGg2i2q3QQydo1Bx302wn9C2O4LgA6RW6uGnOw3oMvfn050nlwrhJ+3cjdU1tmZQYujovtULXU9e5IUMo3EOIB6JgymXrvlrewwy7iPl61m4sRMbQIDAQAB |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
require_once 'vendor/autoload.php'; | |
define('AUTH_SERVER_URL', 'http://localhost:8080'); | |
define('AUTH_REALM', 'my-app'); | |
define('AUTH_CLIENT_ID', 'my-client'); | |
define('AUTH_CLIENT_SECRET', '1b148a52-3d7e-4d04-992a-255e25c6311c'); | |
$tokenObject = null; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"require": { | |
"league/oauth2-client": "2.*", | |
"stevenmaguire/oauth2-keycloak": "2.*" | |
} | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
wget https://downloads.jboss.org/keycloak/3.4.3.Final/keycloak-3.4.3.Final.zip | |
unzip keycloak-3.4.3.Final.zip | |
cd keycloak-3.4.3.Final | |
bash ./bin/standalone.sh |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
stop=0 | |
function ctr_c { | |
stop=1 | |
echo " caught. Gracefully stopping" | |
trap - SIGINT SIGTERM | |
echo "Press Ctr+C again to force SIGINT" | |
} | |
trap "ctr_c" SIGINT SIGTERM |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env bash | |
serviceName=$1 | |
if [ "${serviceName}" = "" ] || [ "${serviceName}" = "--help" ] | |
then | |
echo "Usage $0 [service-name.service]" | |
echo "" | |
echo "Stops the systemd user services and waits for real end of processes" | |
echo "Stops also all services which ConsistsOf this one (recursively)" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{"message":"An error occurred during dispatching of command \u0022Prooph\\ProophessorDo\\Model\\User\\Command\\RegisterUser\u0022","trace":"# | |
0 /var/www/vendor/zendframework/zend-expressive/src/Middleware/LazyLoadingMiddleware.php(60): Prooph\\Psr7Middleware\\CommandMiddleware-\u003Eprocess(Object(Zend\\Diactoros\\ServerRequest), Object(Zend\\Stratigility\\Next))\n# | |
1 /var/www/vendor/zendframework/zend-stratigility/src/Next.php(144): Zend\\Expressive\\Middleware\\LazyLoadingMiddleware-\u003Eprocess(Object(Zend\\Diactoros\\ServerRequest), Object(Zend\\Stratigility\\Next))\n# | |
2 /var/www/vendor/zendframework/zend-stratigility/src/Next.php(95): Zend\\Stratigility\\Next-\u003Ehandle(Object(Zend\\Diactoros\\ServerRequest))\n# | |
3 /var/www/src/Middleware/JsonError.php(32): Zend\\Stratigility\\Next-\u003Eprocess(Object(Zend\\Diactoros\\ServerRequest))\n# | |
4 /var/www/vendor/zendframework/zend-stratigility/src/Next.php(144): Prooph\\ProophessorDo\\Middleware\\JsonError-\u003Eprocess(Object(Zend\\Diactoros\\ServerRequest), |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
require_once 'vendor/autoload.php'; | |
$integrationAdminTokenService = new Swagger\Client\Api\IntegrationAdminTokenServiceV1Api(); | |
$loginBody = new \Swagger\Client\Model\Body136(); | |
$loginBody->setPassword('username'); | |
$loginBody->setUsername('password'); | |
$token = $integrationAdminTokenService->integrationAdminTokenServiceV1CreateAdminAccessTokenPost($loginBody); |
NewerOlder