android-components / mozilla.components.concept.storage / Login

Login

data class Login (source)

Represents a login that can be used by autofill APIs.

Note that much of this information can be partial (e.g., a user might save a password with a blank username).

Constructors

Name Summary
<init> Login(guid: String? = null, origin: String, formActionOrigin: String? = null, httpRealm: String? = null, username: String, password: String)
Represents a login that can be used by autofill APIs.

Properties

Name Summary
formActionOrigin val formActionOrigin: String?
The origin this login entry was submitted to. This only applies to form-based login entries. It’s derived from the action attribute set on the form element.
guid val guid: String?
The unique identifier for this login entry.
httpRealm val httpRealm: String?
The HTTP realm this login entry was requested for. This only applies to non-form-based login entries. It’s derived from the WWW-Authenticate header set in a HTTP 401 response, see RFC2617 for details.
origin val origin: String
The origin this login entry applies to.
password val password: String
The password for this login entry.
username val username: String
The username for this login entry.

Extension Functions

Name Summary
loadResourceAsString fun Any.loadResourceAsString(path: String): String
Loads a file from the resources folder and returns its content as a string object.
toServerPassword fun Login.toServerPassword(): ServerPassword
Converts an Android Components Login to an Application Services ServerPassword