I think I managed to do a login with python:
If you do a POST-request towards
https://play.tv2.no/rest/user/session with the following JSON as postdata, you'll get a SAML Bearer-token in the response header (authorization header):
python:
json_post = {"password": password, "remember_me": True, "user_name": email}
The JSON response also contains some useful data:
json:
{"purchase_enabled":true,"login_enabled":true,"vouchers":null,"session":{"self_uri":"/rest/user/session","status":"SESSION_AUTHENTICATED"},"id":10933059,"email":"your@email.no","user_name":"your@email.no","zip":"0000","first_name":"OLA","last_name":"NORMANN","gender":3,"registration_date":"1970-01-01T01:00:00+01:00","city":"DINBY","email_status":1,"date_of_birth":"1970-01-01T01:00:00+01:00","mobile_status":0,"profiles":{"subProfiles":[{"subProfileName":"OLA","defaultProfile":true,"subProfileId":"fedcba98-abcd-1234-5678-0123456789abc","color":"#B2AEFF","kidsProfile":"false"}],"activeSubProfileId":"fedcba98-abcd-1234-5678-0123456789abc"},"targeting_id":"123abc","mobile_number":"00000000","profile_completeness":77,"terms_update_required":false,"my_channels_uri":"/rest/user/my_channels","my_channel_uri":"/rest/user/my_channel","favorites_uri":"/rest/user/favorites","subscription_status":"UPGRADABLE","autorenew_payment_valid":true,"notification":null,"logged_in":true}
Hopefully someone could use this to make an addon to KODI for TV2play (former TV2sumo).