Skip to content

Instantly share code, notes, and snippets.

@maxsap
maxsap / buf.gen.yaml
Last active June 22, 2023 07:48
Substreams node client
version: v1
managed:
enabled: true
plugins:
- name: es
path: ./node_modules/.bin/protoc-gen-es
out: src/generated
opt: target=ts
@maxsap
maxsap / CustomJwtTokenStore
Last active April 10, 2020 08:55
Spring Security OAuth2 programmatic configuration.
import java.util.ArrayList;
import java.util.Collection;
import java.util.List;
import org.apache.commons.lang3.SerializationUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.security.jwt.JwtHelper;
import org.springframework.security.oauth2.common.OAuth2AccessToken;
import org.springframework.security.oauth2.common.OAuth2RefreshToken;
import org.springframework.security.oauth2.common.exceptions.InvalidTokenException;