Esempio n. 1
0
 private void DecodeJwtToken()
 {
     TextBoxJwtSignature.Clear();
     TextBoxJwtHeader.Clear();
     TextBoxJwtBody.Clear();
     if (String.IsNullOrEmpty(TextBoxJwtToken.Text))
     {
         return;
     }
     ParseToken(TextBoxJwtToken.Text);
 }
Esempio n. 2
0
 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);
     }
 }