All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.pusher.client.util.HttpAuthorizer.html Maven / Gradle / Ivy

There is a newer version: 2.4.4
Show newest version





HttpAuthorizer (Pusher Java Websocket API)












com.pusher.client.util

Class HttpAuthorizer

  • java.lang.Object
    • com.pusher.client.util.HttpAuthorizer
    • Constructor Summary

      Constructors 
      Constructor and Description
      HttpAuthorizer(java.lang.String endPoint)
      Creates a new authorizer.
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method and Description
      java.lang.String authorize(java.lang.String channelName, java.lang.String socketId)
      Called when a channel is to be authenticated.
      java.lang.Boolean isSSL()
      Identifies if the HTTP request will be sent over HTTPS.
      void setHeaders(java.util.Map<java.lang.String,java.lang.String> headers)
      Set additional headers to be sent as part of the request.
      void setQueryStringParameters(java.util.HashMap<java.lang.String,java.lang.String> queryStringParameters)
      This methods is for passing extra parameters authentication that needs to be added to query string.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • HttpAuthorizer

        public HttpAuthorizer(java.lang.String endPoint)
        Creates a new authorizer.
        Parameters:
        endPoint - The endpoint to be called when authenticating.
    • Method Detail

      • setHeaders

        public void setHeaders(java.util.Map<java.lang.String,java.lang.String> headers)
        Set additional headers to be sent as part of the request.
        Parameters:
        headers - A map of headers
      • isSSL

        public java.lang.Boolean isSSL()
        Identifies if the HTTP request will be sent over HTTPS.
        Returns:
        true if the endpoint protocol is 'https'
      • setQueryStringParameters

        public void setQueryStringParameters(java.util.HashMap<java.lang.String,java.lang.String> queryStringParameters)
        This methods is for passing extra parameters authentication that needs to be added to query string.
        Parameters:
        queryStringParameters - the query parameters
      • authorize

        public java.lang.String authorize(java.lang.String channelName,
                                          java.lang.String socketId)
                                   throws AuthorizationFailureException
        Description copied from interface: Authorizer
        Called when a channel is to be authenticated.
        Specified by:
        authorize in interface Authorizer
        Parameters:
        channelName - The name of the channel to be authenticated.
        socketId - A unique socket connection ID to be used with the authentication. This uniquely identifies the connection that the subscription is being authenticated for.
        Returns:
        An authentication token.
        Throws:
        AuthorizationFailureException - if the authentication fails.




© 2015 - 2025 Weber Informatics LLC | Privacy Policy