Class: LogInto::HotSpot_Airport
- Inherits:
-
Object
- Object
- LogInto::HotSpot_Airport
- Defined in:
- lib/weblogin/providers/hotspot_airport.rb
Instance Method Summary collapse
- #is_mine?(response) ⇒ Boolean
- #login(url, cookie, body) ⇒ Object
- #login_with_response(response) ⇒ Object
Instance Method Details
#is_mine?(response) ⇒ Boolean
6 7 8 9 |
# File 'lib/weblogin/providers/hotspot_airport.rb', line 6 def is_mine? response # eg: https://hotspot.t-mobile.net/wlan/start.do?ts=1381305999133 response.args[:url] =~ /https:\/\/hotspot\.t-mobile\.net\/landing\/TD\/Airport/ end |
#login(url, cookie, body) ⇒ Object
19 20 21 |
# File 'lib/weblogin/providers/hotspot_airport.rb', line 19 def login url, , body LogInto::HotSpot.new.login url.to_s, end |
#login_with_response(response) ⇒ Object
11 12 13 14 15 16 17 |
# File 'lib/weblogin/providers/hotspot_airport.rb', line 11 def login_with_response response # get some fields that are set anyway url = URI.parse(response.args[:url]) = response.args[:headers][:cookie] body = response.body login( url, , body ) end |