All notable changes to this project will be documented in this file.
The format is based on Keep a Changelog and this project adheres to Semantic Versioning.
- engage
----- Interested Reads------ | |
+ Interesting Read (Serverless Architecture of Acloud guru) | |
https://read.acloud.guru/serverless-the-future-of-software-architecture-d4473ffed864 | |
----- Getting Started------- | |
+ Requirements | |
+ AWS Free Tier Account | |
+ PC with putty and putty keygen/ Mac | |
+ Optional | |
+ IoS/ Android App $20 |
package com.example; | |
import org.springframework.web.bind.annotation.RequestMapping; | |
import org.springframework.web.bind.annotation.RestController; | |
import java.util.HashMap; | |
import java.util.Map; | |
@RestController | |
@RequestMapping("/api") |
import javax.validation.Constraint; | |
import javax.validation.Payload; | |
import java.lang.annotation.Retention; | |
import java.lang.annotation.Target; | |
import static java.lang.annotation.ElementType.FIELD; | |
import static java.lang.annotation.ElementType.PARAMETER; | |
import static java.lang.annotation.RetentionPolicy.RUNTIME; | |
/** |
// MyFilter.java | |
public void doFilter(ServletRequest request, ServletResponse response, FilterChain chain) throws IOException, ServletException { | |
OutputStream out = response.getOutputStream(); | |
ResponseWrapper wrapper = new ResponseWrapper((HttpServletResponse)response); | |
chain.doFilter(request, wrapper); | |
byte responseContent[] = wrapper.getData(); | |
// Write copied response, should change whatever you want in 'responseContent' before sending to client | |
out.write(responseContent); |
http.addFilterBefore(customAuthFilter(), SecurityContextPersistenceFilter.class) | |
.authorizeRequests() | |
.antMatchers("/**") | |
.authenticated() | |
.and() | |
.exceptionHandling().disable() | |
.sessionManagement().disable() | |
.rememberMe().disable() | |
.x509().disable() | |
.headers().disable() |
@Configuration | |
@EnableWebMvcSecurity | |
public class WebSecurityConfig | |
extends WebSecurityConfigurerAdapter { | |
@Value("${oauth.check_token.url:http://localhost:3030/oauth/token/info}") | |
private String checkTokenUrl; | |
@Autowired @Qualifier("restTemplate") | |
private RestOperations authRestTemplate; |
@Configuration | |
@EnableWebMvcSecurity | |
public class WebSecurityConfig | |
extends WebSecurityConfigurerAdapter { | |
@Value("${oauth.check_token.url:http://localhost:3030/oauth/token/info}") | |
private String checkTokenUrl; | |
@Autowired @Qualifier("restTemplate") | |
private RestOperations authRestTemplate; |
package cz.monetplus.mac; | |
import static org.assertj.core.api.Assertions.assertThat; | |
import org.apache.commons.codec.binary.Hex; | |
import org.bouncycastle.crypto.BlockCipher; | |
import org.bouncycastle.crypto.Mac; | |
import org.bouncycastle.crypto.engines.DESEngine; | |
import org.bouncycastle.crypto.macs.ISO9797Alg3Mac; | |
import org.bouncycastle.crypto.params.KeyParameter; |
import javax.xml.transform.*; | |
import javax.xml.transform.stream.StreamResult; | |
import javax.xml.transform.stream.StreamSource; | |
import java.io.File; | |
import java.io.IOException; | |
import java.net.URISyntaxException; | |
public class XsltTransform { | |
public static void main(String[] args) throws IOException, | |
URISyntaxException, |
All notable changes to this project will be documented in this file.
The format is based on Keep a Changelog and this project adheres to Semantic Versioning.