com.bluebillywig.bbnativeshared.data — Functions
headersFor
fun headersFor(url: String) : Map<String, String>
The headers to send with a request to [url]; empty unless [url] is a Blue Billywig origin.
fromOptions
fun fromOptions(options: Map<String, Any?>?) : ContentAuth?
The credentials in the player [options], or null when there are none.
isBbAuthOrigin
fun isBbAuthOrigin(url: String) : Boolean
https on bluebillywig.com / bbvms.com or a subdomain, or http(s) on a local dev host.
Mirrors isBbAuthOrigin in the web channel (src/util/auth-tokens.ts); keep them in sync.
redactUrl
fun redactUrl(url: String) : String
[url] with the value of any jwt / rpctoken query parameter replaced, for logging.