Class FirebaseTokenValidator
java.lang.Object
com.google.cloud.spring.security.firebase.FirebaseTokenValidator
- All Implemented Interfaces:
org.springframework.security.oauth2.core.OAuth2TokenValidator<org.springframework.security.oauth2.jwt.Jwt>
public class FirebaseTokenValidator
extends Object
implements org.springframework.security.oauth2.core.OAuth2TokenValidator<org.springframework.security.oauth2.jwt.Jwt>
Validates Firebase JWT tokens using the rules presented here at
https://firebase.google.com/docs/auth/admin/verify-id-tokens.
This validator will check the following claims:
- iat : Must be in the past
- aud : Must be the firebase project id
- auth_time : Must be in the past
- sub : Must not be empty
- Since:
- 1.2.2
-
Constructor Summary
ConstructorDescriptionFirebaseTokenValidator
(String projectId) FirebaseTokenValidator
(String projectId, Duration clockSkew) -
Method Summary
Modifier and TypeMethodDescriptionorg.springframework.security.oauth2.core.OAuth2TokenValidatorResult
validate
(org.springframework.security.oauth2.jwt.Jwt token)
-
Constructor Details
-
FirebaseTokenValidator
-
FirebaseTokenValidator
-
-
Method Details
-
validate
public org.springframework.security.oauth2.core.OAuth2TokenValidatorResult validate(org.springframework.security.oauth2.jwt.Jwt token) - Specified by:
validate
in interfaceorg.springframework.security.oauth2.core.OAuth2TokenValidator<org.springframework.security.oauth2.jwt.Jwt>
-