Class 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  
    • 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)  
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
      • Methods inherited from interface com.linecorp.armeria.server.auth.Authorizer

        orElse
    • Field Detail

      • FIREBASE_TOKEN

        public static final io.netty.util.AttributeKey<com.google.firebase.auth.FirebaseToken> FIREBASE_TOKEN
      • RAW_FIREBASE_TOKEN

        public static final io.netty.util.AttributeKey<java.lang.String> RAW_FIREBASE_TOKEN
    • 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 interface com.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 interface com.linecorp.armeria.server.auth.AuthFailureHandler<com.linecorp.armeria.common.HttpRequest,​com.linecorp.armeria.common.HttpResponse>
        Throws:
        java.lang.Exception