Exception: T2Server::AuthorizationError
- Inherits:
-
T2ServerError
- Object
- RuntimeError
- T2ServerError
- T2Server::AuthorizationError
- Defined in:
- lib/t2-server/exceptions.rb
Overview
Access to the server is denied to this username
Instance Attribute Summary collapse
-
#username ⇒ Object
readonly
The username that has failed authorization.
Instance Method Summary collapse
-
#initialize(credentials) ⇒ AuthorizationError
constructor
Create a new AuthorizationError with the rejected username.
Constructor Details
#initialize(credentials) ⇒ AuthorizationError
Create a new AuthorizationError with the rejected username
178 179 180 181 182 183 184 185 186 |
# File 'lib/t2-server/exceptions.rb', line 178 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
#username ⇒ Object (readonly)
The username that has failed authorization.
175 176 177 |
# File 'lib/t2-server/exceptions.rb', line 175 def username @username end |