Method FromOtpUrl
FromOtpUrl(Uri, out String, out Byte[], out IDictionary<String, String>)
Creates either a TimeBasedPasswordGenerator or CounterBasedPasswordGenerator instance pre-configured with values from an otp style uri.
Declaration
public static IOnetimePasswordGenerator FromOtpUrl(Uri url, out string label, out byte[] secret, out IDictionary<string, string> metadata)
Parameters
Type | Name | Description |
---|---|---|
Uri | url | The url to parse and turn into a password generator. |
System.String | label | An out parameter returning the name of the account or resource accessed using the generated passwords. |
System.Byte[] | secret | An out paramete returning the secret used by the generator. |
IDictionary<System.String, System.String> | metadata | A dictionary containing additional metadata retrieved from the URL. |
Returns
Type | Description |
---|---|
IOnetimePasswordGenerator | A pre-configured instance of either a TimeBasedPasswordGenerator or CounterBasedPasswordGenerator. |
Remarks
See https://github.com/google/google-authenticator/tree/master/mobile/ios for details of the uri format.
See Also
FromOtpUrl(Uri)
Creates either a TimeBasedPasswordGenerator or CounterBasedPasswordGenerator instance pre-configured with values from an otp style uri.
Declaration
public static OnetimePasswordAccount FromOtpUrl(Uri url)
Parameters
Type | Name | Description |
---|---|---|
Uri | url | The url to parse and turn into a password generator. |
Returns
Type | Description |
---|---|
OnetimePasswordAccount | A pre-configured instance of either a TimeBasedPasswordGenerator or CounterBasedPasswordGenerator. |
Remarks
See https://github.com/google/google-authenticator/wiki/Key-Uri-Format for details of the uri format.