ARCHIVED because this lib doesn't work any more and can be replaced by a much simpler solution: Just add the following to your application.yaml
micronaut:
security:
token:
jwt:
enabled: true
signatures:
jwks:
firebase:
url: 'https://www.googleapis.com/service_accounts/v1/jwk/securetoken@system.gserviceaccount.com'
Integrates Firebase Auth Token validation into a Micronaut application via Micronaut Security.
You need to initialize the Firebase SDK at application startup.
Add Firebase Admin SDK dependency
This dependency is available at Maven Central.
dependencies {
...
implementation("de.breuco:micronaut-security-firebase:0.2.7")
compileOnly("io.micronaut.security:micronaut-security")
...
}
<?xml version="1.0" encoding="UTF-8"?>
<project>
...
<dependencies>
<dependency>
<groupId>de.breuco</groupId>
<artifactId>micronaut-security-firebase</artifactId>
<version>0.2.7</version>
</dependency>
<dependency>
<groupId>io.micronaut.security</groupId>
<artifactId>micronaut-security</artifactId>
<scope>compile</scope>
</dependency>
</dependencies>
...
</project>