Skip to content

Instantly share code, notes, and snippets.

View imdadareeph's full-sized avatar
🎯
Focusing

Imdad Areeph imdadareeph

🎯
Focusing
View GitHub Profile
@imdadareeph
imdadareeph / UserController.java
Created August 8, 2020 01:51
springbootjwtauth2keycloak UserController
package com.imdadareeph.springbootjwtauth2keycloak.controller;
import com.imdadareeph.springbootjwtauth2keycloak.config.SecurityContextUtils;
import com.imdadareeph.springbootjwtauth2keycloak.model.LoginModel;
import com.imdadareeph.springbootjwtauth2keycloak.model.UserDetails;
import org.springframework.http.MediaType;
import org.springframework.http.ResponseEntity;
import org.springframework.security.access.prepost.PreAuthorize;
import org.springframework.web.bind.annotation.*;
@imdadareeph
imdadareeph / JwtAccessTokenCustomizer.java
Last active August 8, 2020 01:50
springbootjwtauth2keycloak JwtAccessTokenCustomizer
package com.imdadareeph.springbootjwtauth2keycloak.config;
import com.fasterxml.jackson.databind.JsonNode;
import com.fasterxml.jackson.databind.ObjectMapper;
import java.util.HashSet;
import java.util.List;
import java.util.Map;
import java.util.Set;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;