Class: Airplay::Connection::Authentication

Inherits:
Struct
  • Object
show all
Defined in:
lib/airplay/connection/authentication.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Instance Attribute Details

#deviceObject

Returns the value of attribute device

Returns:

  • (Object)

    the current value of device



5
6
7
# File 'lib/airplay/connection/authentication.rb', line 5

def device
  @device
end

#handlerObject

Returns the value of attribute handler

Returns:

  • (Object)

    the current value of handler



5
6
7
# File 'lib/airplay/connection/authentication.rb', line 5

def handler
  @handler
end

Instance Method Details

#sign(request) ⇒ Object



6
7
8
9
10
# File 'lib/airplay/connection/authentication.rb', line 6

def sign(request)
  auth_token = authenticate(request)
  request.add_field('Authorization', auth_token) if auth_token
  request
end