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
Show hidden characters
{ | |
"name": "Frappe Bench", | |
"forwardPorts": [8000, 9000, 6787], | |
"remoteUser": "frappe", | |
// "settings": { | |
// "terminal.integrated.profiles.linux": { | |
// "frappe bash": { | |
// "path": "/bin/bash" | |
// } | |
// }, |
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
openapi: 3.0.1 | |
info: | |
title: / | |
version: 0.1.0 | |
servers: | |
- url: "{server}:{port}/" | |
variables: | |
server: | |
default: http://localhost | |
port: |
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
package com.example.springboot.jwt; | |
import com.nimbusds.jose.JOSEObjectType; | |
import com.nimbusds.jose.proc.DefaultJOSEObjectTypeVerifier; | |
import org.springframework.boot.autoconfigure.security.oauth2.resource.OAuth2ResourceServerProperties; | |
import org.springframework.context.annotation.Bean; | |
import org.springframework.context.annotation.Configuration; | |
import org.springframework.security.oauth2.jwt.JwtDecoder; | |
import org.springframework.security.oauth2.jwt.NimbusJwtDecoder; |
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
{ | |
"access_token": "eyJ4NXQiOiJaakV5WlRVMFptRXhaVEJsWkdVMVkyUTFZalJpTjJZeE9XWmlNR00zWkRoalkySTNZek14WlRjNE5XTmlPV1UxTmpKbE1qTXpaVGcyTTJWbFpEVTNaUSIsImtpZCI6IlpqRXlaVFUwWm1FeFpUQmxaR1UxWTJRMVlqUmlOMll4T1daaU1HTTNaRGhqWTJJM1l6TXhaVGM0TldOaU9XVTFOakpsTWpNelpUZzJNMlZsWkRVM1pRX1JTMjU2IiwidHlwIjoiYXQrand0IiwiYWxnIjoiUlMyNTYifQ.eyJzdWIiOiI2MDRiODc5ZS0wZDZhLTQwYjItOTEyNS05MjFjM2E4MjYwZWIiLCJhdXQiOiJBUFBMSUNBVElPTl9VU0VSIiwiYmluZGluZ190eXBlIjoic3NvLXNlc3Npb24iLCJpc3MiOiJodHRwczpcL1wvYXBpLmFzZ2FyZGVvLmlvXC90XC9pbWVzaGFvcmdcL29hdXRoMlwvdG9rZW4iLCJjbGllbnRfaWQiOiJ0d0dDcEhpMFl5cVlyZU5CYmFRR1FHZlVLX0VhIiwiYXVkIjoidHdHQ3BIaTBZeXFZcmVOQmJhUUdRR2ZVS19FYSIsIm5iZiI6MTY1Njg2MjI4MSwiYXpwIjoidHdHQ3BIaTBZeXFZcmVOQmJhUUdRR2ZVS19FYSIsInNjb3BlIjoiZW1haWwgb3BlbmlkIHByb2ZpbGUiLCJleHAiOjE2NTY4NjU4ODEsImlhdCI6MTY1Njg2MjI4MSwiYmluZGluZ19yZWYiOiI1ZmUxNDVhODg3Mzk1NDljNmEyNWM0ZDgxNjg0NGU4NyIsImp0aSI6IjA5M2IxNTFmLTI5NzEtNDkyYS1iZWFjLTEzOTFmMDJjZjg4ZiIsInVzZXJuYW1lIjoiaW1lc2hhQHdzbzIuY29tIn0.cuTj9KwppvR3JzM19eiils3NlFRod7HhNgJZnjh92h3y_1q2p8 |
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
package com.example.springboot.jwt; | |
import org.springframework.context.annotation.Bean; | |
import org.springframework.context.annotation.Configuration; | |
import org.springframework.security.config.annotation.web.builders.HttpSecurity; | |
import org.springframework.security.config.annotation.web.configurers.oauth2.server.resource.OAuth2ResourceServerConfigurer; | |
import org.springframework.security.config.http.SessionCreationPolicy; | |
import org.springframework.security.web.SecurityFilterChain; | |
/** |
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
package com.example.springboot.jwt.controller; | |
import com.example.springboot.jwt.entity.Product; | |
import org.apache.commons.lang3.StringUtils; | |
import org.springframework.http.HttpStatus; | |
import org.springframework.web.bind.annotation.CrossOrigin; | |
import org.springframework.web.bind.annotation.GetMapping; | |
import org.springframework.web.bind.annotation.PostMapping; | |
import org.springframework.web.bind.annotation.RequestBody; | |
import org.springframework.web.bind.annotation.RequestMapping; |
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
package com.example.springboot.jwt.entity; | |
import java.util.UUID; | |
/** | |
* Represents a product | |
*/ | |
public class Product { | |
private String id; |
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
import ballerina/http; | |
import ballerina/time; | |
import ballerina/log; | |
configurable string chatId = ?; | |
configurable string chatKey = ?; | |
configurable string chatToken = ?; | |
// How often will this program be executed | |
configurable int intervalSeconds = 60 * 10; |
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
import ballerina/http; | |
import ballerina/log; | |
import ballerina/uuid; | |
# Represents a product | |
# | |
# + id - Product ID | |
# + name - Name of the product | |
# + description - Product description | |
# + price - Product price |
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
import ballerina/log; | |
import ballerina/http; | |
configurable int port = 8080; | |
http:Client dccClient = check new("https://api.exchangerate.host"); | |
type ConversionResponse record { | |
boolean success; | |
string base; |
NewerOlder