Carson Wright
Carson Wright

Reputation: 323

Having trouble with getting basic auth from play framework

I have request.headers.get("Authorization") but I still don't receive anything other than none

def test = Action { request =>
    Ok("Here " + request.headers.get("Authorization") + " there")
}

I would like to be able to parse the basic auth, but since I currently don't even receive it its kind of a mute point.

Upvotes: 1

Views: 111

Answers (1)

egprentice
egprentice

Reputation: 824

Try doing request.headers.getHeaders() (which produces a map) and loop through the map, printing all Key,Value pairs to see if it is truly missing.

Upvotes: 1

Related Questions