-
Notifications
You must be signed in to change notification settings - Fork 51
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Use var instead of explicit type everywhere but Core
- Loading branch information
1 parent
ae0a608
commit a6e1b42
Showing
201 changed files
with
1,536 additions
and
1,583 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
102 changes: 51 additions & 51 deletions
102
Yubico.YubiKey/examples/Fido2SampleCode/Run/Fido2SampleRun.Operations.cs
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -52,7 +52,7 @@ public static bool RunAddTotpCredential( | |
} | ||
else | ||
{ | ||
Credential credential = CollectTotpCredential(menuObject); | ||
var credential = CollectTotpCredential(menuObject); | ||
oathSession.AddCredential(credential); | ||
ReportResult(credential); | ||
} | ||
|
@@ -93,7 +93,7 @@ public static bool RunAddHotpCredential( | |
} | ||
else | ||
{ | ||
Credential credential = CollectHotpCredential(menuObject); | ||
var credential = CollectHotpCredential(menuObject); | ||
oathSession.AddCredential(credential); | ||
ReportResult(credential); | ||
} | ||
|
@@ -116,12 +116,12 @@ public static bool RunAddDefaultTotpCredential( | |
|
||
if (menuObject is null) | ||
{ | ||
Credential credential = oathSession.AddCredential("Yubico", "[email protected]"); | ||
var credential = oathSession.AddCredential("Yubico", "[email protected]"); | ||
ReportResult(credential); | ||
} | ||
else | ||
{ | ||
Credential credential = CollectDefaultTotpCredential(); | ||
var credential = CollectDefaultTotpCredential(); | ||
oathSession.AddCredential(credential); | ||
ReportResult(credential); | ||
} | ||
|
@@ -144,7 +144,7 @@ public static bool RunAddDefaultHotpCredential( | |
|
||
if (menuObject is null) | ||
{ | ||
Credential credential = oathSession.AddCredential( | ||
var credential = oathSession.AddCredential( | ||
"Yubico", | ||
"[email protected]", | ||
CredentialType.Hotp, | ||
|
@@ -153,7 +153,7 @@ public static bool RunAddDefaultHotpCredential( | |
} | ||
else | ||
{ | ||
Credential credential = CollectDefaultHotpCredential(); | ||
var credential = CollectDefaultHotpCredential(); | ||
oathSession.AddCredential(credential); | ||
ReportResult(credential); | ||
} | ||
|
@@ -176,14 +176,14 @@ public static bool RunAddCredentialFromQR( | |
|
||
if (menuObject is null) | ||
{ | ||
Credential credential = oathSession.AddCredential( | ||
var credential = oathSession.AddCredential( | ||
"otpauth://totp/Yubico:[email protected]?secret=YY4KVNOUQ5IIUBAOGIDRYZ7FGY54VW54&issuer=Yubico&algorithm=SHA1&digits=6&period=30"); | ||
ReportResult(credential); | ||
} | ||
else | ||
{ | ||
string stringFromUri = CollectStringFromUri(); | ||
Credential credential = oathSession.AddCredential(stringFromUri); | ||
var credential = oathSession.AddCredential(stringFromUri); | ||
ReportResult(credential); | ||
} | ||
} | ||
|
@@ -254,9 +254,9 @@ private static Credential CollectTotpCredential(SampleMenu menuObject) | |
SampleMenu.WriteMessage(MessageType.Title, 0, "Enter account name"); | ||
_ = SampleMenu.ReadResponse(out string account); | ||
|
||
_ = ChooseCredentialProperties.RunChoosePeriodOption(menuObject, out CredentialPeriod? period); | ||
_ = ChooseCredentialProperties.RunChoosePeriodOption(menuObject, out var period); | ||
|
||
_ = ChooseCredentialProperties.RunChooseAlgorithmOption(menuObject, out HashAlgorithm? algorithm); | ||
_ = ChooseCredentialProperties.RunChooseAlgorithmOption(menuObject, out var algorithm); | ||
|
||
SampleMenu.WriteMessage(MessageType.Title, 0, "Enter secret"); | ||
_ = SampleMenu.ReadResponse(out string secret); | ||
|
@@ -290,7 +290,7 @@ private static Credential CollectHotpCredential(SampleMenu menuObject) | |
SampleMenu.WriteMessage(MessageType.Title, 0, "Enter account name"); | ||
_ = SampleMenu.ReadResponse(out string account); | ||
|
||
_ = ChooseCredentialProperties.RunChooseAlgorithmOption(menuObject, out HashAlgorithm? algorithm); | ||
_ = ChooseCredentialProperties.RunChooseAlgorithmOption(menuObject, out var algorithm); | ||
|
||
SampleMenu.WriteMessage(MessageType.Title, 0, "Enter secret"); | ||
_ = SampleMenu.ReadResponse(out string secret); | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.