Class FirebaseAuthorizer
- java.lang.Object
-
- org.curioswitch.common.server.framework.auth.firebase.FirebaseAuthorizer
-
- All Implemented Interfaces:
com.linecorp.armeria.server.auth.AuthFailureHandler<com.linecorp.armeria.common.HttpRequest,com.linecorp.armeria.common.HttpResponse>
,com.linecorp.armeria.server.auth.Authorizer<com.linecorp.armeria.server.auth.OAuth2Token>
public class FirebaseAuthorizer extends java.lang.Object implements com.linecorp.armeria.server.auth.Authorizer<com.linecorp.armeria.server.auth.OAuth2Token>, com.linecorp.armeria.server.auth.AuthFailureHandler<com.linecorp.armeria.common.HttpRequest,com.linecorp.armeria.common.HttpResponse>
-
-
Field Summary
Fields Modifier and Type Field Description static io.netty.util.AttributeKey<com.google.firebase.auth.FirebaseToken>
FIREBASE_TOKEN
static io.netty.util.AttributeKey<java.lang.String>
RAW_FIREBASE_TOKEN
-
Constructor Summary
Constructors Constructor Description FirebaseAuthorizer(com.google.firebase.auth.FirebaseAuth firebaseAuth, FirebaseAuthConfig config)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description com.linecorp.armeria.common.HttpResponse
authFailed(com.linecorp.armeria.server.Service<com.linecorp.armeria.common.HttpRequest,com.linecorp.armeria.common.HttpResponse> delegate, com.linecorp.armeria.server.ServiceRequestContext ctx, com.linecorp.armeria.common.HttpRequest req, java.lang.Throwable cause)
java.util.concurrent.CompletionStage<java.lang.Boolean>
authorize(com.linecorp.armeria.server.ServiceRequestContext ctx, com.linecorp.armeria.server.auth.OAuth2Token data)
-
-
-
Constructor Detail
-
FirebaseAuthorizer
@Inject public FirebaseAuthorizer(com.google.firebase.auth.FirebaseAuth firebaseAuth, FirebaseAuthConfig config)
-
-
Method Detail
-
authorize
public java.util.concurrent.CompletionStage<java.lang.Boolean> authorize(com.linecorp.armeria.server.ServiceRequestContext ctx, com.linecorp.armeria.server.auth.OAuth2Token data)
- Specified by:
authorize
in interfacecom.linecorp.armeria.server.auth.Authorizer<com.linecorp.armeria.server.auth.OAuth2Token>
-
authFailed
public com.linecorp.armeria.common.HttpResponse authFailed(com.linecorp.armeria.server.Service<com.linecorp.armeria.common.HttpRequest,com.linecorp.armeria.common.HttpResponse> delegate, com.linecorp.armeria.server.ServiceRequestContext ctx, com.linecorp.armeria.common.HttpRequest req, @Nullable java.lang.Throwable cause) throws java.lang.Exception
- Specified by:
authFailed
in interfacecom.linecorp.armeria.server.auth.AuthFailureHandler<com.linecorp.armeria.common.HttpRequest,com.linecorp.armeria.common.HttpResponse>
- Throws:
java.lang.Exception
-
-