lib/ury_rapid/server/updater.rb
# Tries to authenticate on the WebSocket
#
# This is part of the in-band authentication handling for a WebSocket:
# an `auth` request via the WebSocket triggers a #try_auth.
#
# If the authentication is successful, the username is returned in an
# `auth` response and the WebSocket will operate with the privileges of
# the authenticated user.  Otherwise, an error is returned.
#
# @api  private
#
# @param username [String]  The username used to authenticate.
# @param password [String]  The password used to authenticate.
#
# @return [void]
Tries to authenticate on the WebSocket
This is part of the in-band authentication handling for a WebSocket:
an `auth` request via the WebSocket triggers a #try_auth.

If the authentication is successful, the username is returned in an
`auth` response and the WebSocket will operate with the privileges of
the authenticated user.  Otherwise, an error is returned.
Tries to authenticate on the WebSocket This is part of the in - band authentication handling for a WebSocket : an ` auth ` request via the WebSocket triggers a #try_auth . If the authentication is successful the username is returned in an ` auth ` response and the WebSocket will operate with the privileges of the authenticated user . Otherwise an error is returned .
def try_auth(username, password)
        new_privileges = @authenticator.call(username, password)
        @privileges = new_privileges
        send_json(type: :auth, username: username)
      rescue Kankri::AuthenticationFailure
        error('Authentication failed.')
      end
def try_auth ( username , password ) new_privileges = @authenticator . call ( username , password ) @privileges = new_privileges send_json ( type : :auth , username : username ) rescue Kankri :: AuthenticationFailure error ( 'Authentication failed.' ) end
Tries to authenticate on the WebSocket
This is part of the in-band authentication handling for a WebSocket:
an `auth` request via the WebSocket triggers a #try_auth.
Tries to authenticate on the WebSocket This is part of the in - band authentication handling for a WebSocket : an ` auth ` request via the WebSocket triggers a #try_auth .
None
void
username
The username used to authenticate.
The username used to authenticate .
password
The password used to authenticate.
The password used to authenticate .
api
None