Exception: T2Server::AuthorizationError

Inherits:
T2ServerError show all
Defined in:
lib/t2-server/exceptions.rb

Overview

Access to the server is denied to this username

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(credentials) ⇒ AuthorizationError

Create a new AuthorizationError with the rejected username



166
167
168
169
170
171
172
173
174
# File 'lib/t2-server/exceptions.rb', line 166

def initialize(credentials)
  if credentials != nil
    @username = credentials.username
  else
    @username = ""
  end
  super "The username '#{@username}' is not authorized to connect to " +
    "this server"
end

Instance Attribute Details

#usernameObject (readonly)

The username that has failed authorization.



163
164
165
# File 'lib/t2-server/exceptions.rb', line 163

def username
  @username
end