private void DecodeJwtToken() { TextBoxJwtSignature.Clear(); TextBoxJwtHeader.Clear(); TextBoxJwtBody.Clear(); if (String.IsNullOrEmpty(TextBoxJwtToken.Text)) { return; } ParseToken(TextBoxJwtToken.Text); }
private void EncodeJwt_Click(object sender, RoutedEventArgs e) { try { TextBoxJwtSignature.Clear(); TextBoxJwtHeader.Clear(); TextBoxJwtBody.Clear(); if (!IsCertificateLoaded()) { return; } TextBoxJwtToken.Text = BuildJwtToken(); DecodeJwtToken(); } catch (Exception err) { MessageBox.Show(err.Message, "Error", MessageBoxButton.OK, MessageBoxImage.Error); } }