Skip to content

Instantly share code, notes, and snippets.

View baso53's full-sized avatar
🎃

Sebastijan Grabar baso53

🎃
  • Croatia
View GitHub Profile
This file has been truncated, but you can view the full file.
{
"aggregate": {
"timestamp": "2020-05-19T10:14:18.542Z",
"scenariosCreated": 169703,
"scenariosCompleted": 169703,
"requestsCompleted": 169703,
"latency": {
"min": 7,
"max": 1581.9,
"median": 10.5,
resources:
- name: project-repo
type: git
source:
uri: git@github.com:spring-petclinic/spring-petclinic-kotlin.git
branch: master
jobs:
- name: build
plan:
platform: linux
image_resource:
type: registry-image
source:
repository: gradle
inputs:
- name: tasks-repo
- name: project-repo
outputs:
- name: build-output
#!/bin/bash
set -eu
gradle build -p ./project-repo
cp ./project-repo/build/libs/-*.jar ./build-output
resources:
- name: project-repo
type: git
source:
uri: git@github.com:spring-petclinic/spring-petclinic-kotlin.git
branch: master
- name: tasks-repo
type: git
source:
@baso53
baso53 / js-question1.js
Last active June 17, 2021 11:46
JS Interview questions
await new Promise(resolve => setTimeout(() => resolve(5), 3000))
@Configuration
public class WebSecurityConfiguration extends WebSecurityConfigurerAdapter {
@Override
protected void configure(HttpSecurity http) throws Exception {
http.authorizeRequests()
.anyRequest()
.authenticated();
http.oauth2ResourceServer()
spring.security.oauth2.resourceserver.jwt.jwk-set-uri=https://www.googleapis.com/service_accounts/v1/jwk/securetoken%40system.gserviceaccount.com
@RestController
@RequestMapping("/app")
public class AppController {
@GetMapping(path = "/test")
public String test(Principal principal) {
return principal.getName();
}
}
curl --location --request GET 'http://localhost:8080/app/test' \
--header 'Authorization: Bearer [your JWT token]' \