Skip to content

Instantly share code, notes, and snippets.

<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<title>Google OAuth2</title>
<link rel="stylesheet" href="./css/bootstrap.min.css">
<link rel="stylesheet" href="./css/app.css">
</head>
<body>
<plugin>
<groupId>com.spotify</groupId>
<artifactId>docker-maven-plugin</artifactId>
<executions>
<execution>
<phase>install</phase>
<goals>
<goal>build</goal>
</goals>
</execution>
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Configurable;
import org.springframework.boot.autoconfigure.security.oauth2.resource.ResourceServerProperties;
import org.springframework.boot.autoconfigure.security.oauth2.resource.UserInfoTokenServices;
import org.springframework.security.config.annotation.authentication.builders.AuthenticationManagerBuilder;
import org.springframework.security.config.annotation.web.builders.HttpSecurity;
import org.springframework.security.config.annotation.web.builders.WebSecurity;
import org.springframework.security.config.annotation.web.configuration.EnableWebSecurity;
import org.springframework.security.config.annotation.web.configuration.WebSecurityConfigurerAdapter;
import org.springframework.security.oauth2.client.OAuth2ClientContext;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RestController;
import java.security.Principal;
@RestController
@RequestMapping("/")
public class UserRestController {
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<title>Google OAuth2</title>
<link rel="stylesheet" href="./css/bootstrap.min.css">
<link rel="stylesheet" href="./css/app.css">
</head>
<body>
<dependency>
<groupId>com.bea.core</groupId>
<artifactId>commons.security.api</artifactId>
<version>1.0</version>
<scope>system</scope>
<systemPath>
${oracle.home}/12.1.3.0/wlserver/modules/com.oracle.css.common.security.api_7.1.0.0.jar
</systemPath>
</dependency>
@pubudu94
pubudu94 / pom.xml
Created June 24, 2018 14:28
properties
<properties>
<oracle.home>/app/wls</oracle.home>
<weblogic.version>12.1.1.0</weblogic.version>
<domain.dir>/app/wls/12.1.3.0/wlserver/server/</domain.dir>
<maven.compiler.source>1.6</maven.compiler.source>
<maven.compiler.target>1.6</maven.compiler.target>
<jar.file>
${project.build.directory}/${project.build.finalName}.jar
</jar.file>
<package.dir>com/weblogic/security</package.dir>
@pubudu94
pubudu94 / pom.xml
Created June 24, 2018 14:28
properties
<properties>
<oracle.home>/app/wls</oracle.home>
<weblogic.version>12.1.1.0</weblogic.version>
<domain.dir>/app/wls/12.1.3.0/wlserver/server/</domain.dir>
<maven.compiler.source>1.6</maven.compiler.source>
<maven.compiler.target>1.6</maven.compiler.target>
<jar.file>
${project.build.directory}/${project.build.finalName}.jar
</jar.file>
<package.dir>com/weblogic/security</package.dir>
<build>
<resources>
<resource>
<filtering>true</filtering>
<directory>src/main/resources</directory>
</resource>
</resources>
<plugins>
<plugin>
<groupId>org.zeroturnaround</groupId>
<profiles>
<profile>
<id>tools-jar-in-plugin</id>
<activation>
<os>
<family>linux</family>
</os>
</activation>
<build>
<plugins>