Changed something, that previously worked without the anotation...
This commit is contained in:
parent
f28418a8ca
commit
14049730a4
12
build.gradle
12
build.gradle
@ -36,14 +36,14 @@ dependencies {
|
||||
implementation 'com.google.code.gson:gson:2.8.5'
|
||||
|
||||
|
||||
compile 'org.springframework.boot:spring-boot-starter-tomcat'
|
||||
compile 'org.springframework.boot:spring-boot-starter-security'
|
||||
compile 'org.springframework.boot:spring-boot-starter-actuator'
|
||||
compile 'org.springframework.boot:spring-boot-starter-aop'
|
||||
compile group: 'org.springframework.boot', name: 'spring-boot-starter-mail', version: '1.2.0.RELEASE'
|
||||
//compile 'org.springframework.boot:spring-boot-starter-tomcat'
|
||||
//compile 'org.springframework.boot:spring-boot-starter-security'
|
||||
//compile 'org.springframework.boot:spring-boot-starter-actuator'
|
||||
//compile 'org.springframework.boot:spring-boot-starter-aop'
|
||||
//ompile group: 'org.springframework.boot', name: 'spring-boot-starter-mail', version: '1.2.0.RELEASE'
|
||||
|
||||
compile group: 'org.springframework.security', name: 'spring-security-core', version: '5.1.4.RELEASE'
|
||||
|
||||
compile group: 'at.favre.lib', name: 'bcrypt', version: '{latest-version}'
|
||||
|
||||
//JWT
|
||||
compile 'io.jsonwebtoken:jjwt-api:0.10.5'
|
||||
|
||||
@ -3,10 +3,11 @@ package hhn.labsw.bugageocaching;
|
||||
|
||||
import org.springframework.boot.SpringApplication;
|
||||
import org.springframework.boot.autoconfigure.SpringBootApplication;
|
||||
import org.springframework.boot.autoconfigure.security.servlet.SecurityAutoConfiguration;
|
||||
import org.springframework.boot.builder.SpringApplicationBuilder;
|
||||
import org.springframework.boot.web.servlet.support.SpringBootServletInitializer;
|
||||
|
||||
@SpringBootApplication
|
||||
@SpringBootApplication(exclude = { SecurityAutoConfiguration.class })
|
||||
public class Application{
|
||||
|
||||
/**@Override
|
||||
|
||||
@ -89,7 +89,7 @@ public class Controller {
|
||||
.setExpiration(new Date(new Date().getTime() + (1000 * 60 * 60 * 24))) //One day expiration
|
||||
.signWith(signatureAlgorithm, key)
|
||||
.compact();
|
||||
/*System.out.println(token);
|
||||
System.out.println(token);
|
||||
|
||||
Claims claims = Jwts.parser() //Parse JWT
|
||||
.setSigningKey(key)
|
||||
@ -98,7 +98,7 @@ public class Controller {
|
||||
System.out.println("Subject: " + claims.getSubject());
|
||||
System.out.println("Issuer: " + claims.getIssuer());
|
||||
System.out.println("Admin: " + claims.get("admin"));
|
||||
System.out.println("Expiration: " + claims.getExpiration());*/
|
||||
System.out.println("Expiration: " + claims.getExpiration());
|
||||
|
||||
return ResponseEntity.status(200).body(token);
|
||||
}
|
||||
|
||||
Loading…
Reference in New Issue
Block a user