Components All New MacOS Windows Linux iOS
Examples Mac & Win Server Client Guides Statistic FMM Blog Deprecated Old

MBS FileMaker Plugin Example Databases

JWT RS256

All examples are included with download of MBS FileMaker Plugin.

JWT RS256.fmp12

Overview
Tables 1
Relationships 0
Layouts 1
Scripts 2
Value Lists 0
Custom Functions 0
Custom Menus 24
File Options
Default custom menu set [Standard FileMaker Menus]
Default theme Apex Blue
When opening file
Minimum allowed version 12.0
Login using Account Name; Account= Admin
Allow user to save password On
Require iOS passcode Off
Show Sign-in fields Off
Switch to layout Off
Hide all toolbars Off
Script triggers
OnFirstWindowOpen Off
OnLastWindowClose Off
OnWindowOpen Off
OnWindowClose Off
OnFileAVPlayerChange Off
OnWindowTransaction Off
Thumbnail Settings
Generate Thumbnails On; Temporary

 

Tables

Table Name
Statistics
Occurrences in Relationship Graph
JWT RS256
6 fields defined, 1 record
JWT RS256

Fields

Table Name: JWT RS256 - 6 Fields
Field Name Type Options Comments On Layouts In Relationships In Scripts In Value Lists
Key Normal, Text Auto-Enter:
  • Allow editing
Validation:
  • Only during data entry
Storage:
  • Repetitions: 1
  • Indexing: None
  • Automatically create indexes as needed
  • Index Language: German
      Header Normal, Text Auto-Enter:
      • Allow editing
      Validation:
      • Only during data entry
      Storage:
      • Repetitions: 1
      • Indexing: None
      • Automatically create indexes as needed
      • Index Language: German
          Output Normal, Text Auto-Enter:
          • Allow editing
          Validation:
          • Only during data entry
          Storage:
          • Repetitions: 1
          • Indexing: None
          • Automatically create indexes as needed
          • Index Language: German
              Password Normal, Text Auto-Enter:
              • Allow editing
              Validation:
              • Only during data entry
              Storage:
              • Repetitions: 1
              • Indexing: None
              • Automatically create indexes as needed
              • Index Language: German
                  Payload Normal, Text Auto-Enter:
                  • Allow editing
                  Validation:
                  • Only during data entry
                  Storage:
                  • Repetitions: 1
                  • Indexing: None
                  • Automatically create indexes as needed
                  • Index Language: German
                      Description Normal, Text Auto-Enter:
                      • Allow editing
                      Validation:
                      • Only during data entry
                      Storage:
                      • Repetitions: 1
                      • Indexing: None
                      • Automatically create indexes as needed
                      • Index Language: German

                            Layout Objects: JWT RS256

                            Regular Fields

                            Field Name: JWT RS256::Key
                            Field Properties Coordinates Field Format Field Behavior Quick Find
                            • Top: 52 pt
                            • Left: 138 pt
                            • Bottom: 182 pt
                            • Right: 690 pt
                            • Anchoring: Left and Right, Top
                            Field Format:
                            • Edit Box
                            Field Behavior:
                            • Allow field to be entered: In Find mode, In Browse mode
                            • Touch keyboard type: Default for Data Type
                            • Go to next field using: Tab key
                            Yes

                            Field Name: JWT RS256::Header
                            Field Properties Coordinates Field Format Field Behavior Quick Find
                            • Top: 207 pt
                            • Left: 138 pt
                            • Bottom: 291 pt
                            • Right: 690 pt
                            • Anchoring: Left and Right, Top
                            Field Format:
                            • Edit Box
                            Field Behavior:
                            • Allow field to be entered: In Find mode, In Browse mode
                            • Touch keyboard type: Default for Data Type
                            • Go to next field using: Tab key
                            Yes

                            Field Name: JWT RS256::Output
                            Field Properties Coordinates Field Format Field Behavior Quick Find
                            • Top: 378 pt
                            • Left: 138 pt
                            • Bottom: 462 pt
                            • Right: 690 pt
                            • Anchoring: Left and Right, Top and Bottom
                            Field Format:
                            • Edit Box
                            Field Behavior:
                            • Allow field to be entered: In Find mode, In Browse mode
                            • Touch keyboard type: Default for Data Type
                            • Go to next field using: Tab key
                            Yes

                            Field Name: JWT RS256::Password
                            Field Properties Coordinates Field Format Field Behavior Quick Find
                            • Top: 183 pt
                            • Left: 138 pt
                            • Bottom: 204 pt
                            • Right: 690 pt
                            • Anchoring: Left and Right, Top
                            Field Format:
                            • Edit Box
                            Field Behavior:
                            • Allow field to be entered: In Find mode, In Browse mode
                            • Touch keyboard type: Default for Data Type
                            • Go to next field using: Tab key
                            Yes

                            Field Name: JWT RS256::Payload
                            Field Properties Coordinates Field Format Field Behavior Quick Find
                            • Top: 294 pt
                            • Left: 138 pt
                            • Bottom: 378 pt
                            • Right: 690 pt
                            • Anchoring: Left and Right, Top
                            Field Format:
                            • Edit Box
                            Field Behavior:
                            • Allow field to be entered: In Find mode, In Browse mode
                            • Touch keyboard type: Default for Data Type
                            • Go to next field using: Tab key
                            Yes

                            Field Name: JWT RS256::Description
                            Field Properties Coordinates Field Format Field Behavior Quick Find
                            • Top: 465 pt
                            • Left: 138 pt
                            • Bottom: 582 pt
                            • Right: 690 pt
                            • Anchoring: Left and Right, Bottom
                            Field Format:
                            • Edit Box
                            Field Behavior:
                            • Allow field to be entered: In Find mode, In Browse mode
                            • Touch keyboard type: Default for Data Type
                            • Go to next field using: Tab key
                            Yes

                            Buttons

                            Button Properties Coordinates Script/Script Step
                              Type:
                            • Text: Calculate
                            • Top: 208 pt
                            • Left: 698 pt
                            • Bottom: 247 pt
                            • Right: 863 pt
                            • Anchoring: Right, Top
                            Perform Script [ “calculate” ]

                            Scripts:


                            Button Properties Coordinates Script/Script Step
                              Type:
                            • Text: Verify
                            • Top: 378 pt
                            • Left: 701 pt
                            • Bottom: 417 pt
                            • Right: 866 pt
                            • Anchoring: Right, Top
                            Perform Script [ “verify” ]

                            Scripts:


                            Script Hierarchy

                            calculate
                            verify

                            Next Script: [verify]
                            Script Name calculate
                            Run script with full access privileges Off
                            Siri Shortcut Visible Off
                            Include In Menu Yes
                            Layouts that use this script
                            Scripts that use this script
                              Script Definition
                              Script Steps
                              • Set Field [ JWT RS256::Output; Let ( [ secret = "secretkey"; header = JWT RS256::Header; payload = JWT RS256::Payload; encodedString = MBS( "Text.EncodeToBase64URL"; header; "UTF-8" ) & "." & MBS( "Text.EncodeToBase64URL"; payload; "UTF-8" ); // calculate hash hash = MBS( "RSA.Sign"; "SHA256"; "Text"; encodedString; "UTF-8"; "Text"; JWT RS256::Key; "UTF-8"; "text"; JWT RS256::Password; "UTF-8"; "base64url"; ""); // and built final result: result = encodedString & "." & hash ]; result ) ]
                              Fields used in this script
                              Scripts used in this script
                                Layouts used in this script
                                  Tables used in this script
                                  Table occurrences used by this script
                                  Custom Functions used by this script
                                    Custom menu set used by this script

                                      Previous Script: [calculate]
                                      Script Name verify
                                      Run script with full access privileges Off
                                      Siri Shortcut Visible Off
                                      Include In Menu Yes
                                      Layouts that use this script
                                      Scripts that use this script
                                        Script Definition
                                        Script Steps
                                        • Set Variable [ $p; Value:Position ( JWT RS256::Output ; "." ; 1 ; 2 ) ]
                                        • Set Variable [ $encodedString; Value:Left ( JWT RS256::Output ; $p-1 ) ]
                                        • Set Variable [ $hash; Value:Middle ( JWT RS256::Output ; $p+1 ; Length ( JWT RS256::Output ) ) ]
                                        • #convert from Base64URL to normal Base64
                                        • Set Variable [ $hash; Value:MBS( "Text.DecodeFromBase64URL"; $hash; "base64" ) ]
                                        • Set Variable [ $r; Value:MBS("RSA.Verify"; "SHA256"; // input "Text"; $encodedString; "UTF-8"; // key "Text"; JWT RS256::Key; "UTF-8"; // signature "Base64"; $hash; ""; // password "text"; JWT RS256::Password; "UTF-8") ]
                                        • If [ MBS("IsError") ]
                                        • Show Custom Dialog [ Title: "Verification failed"; Message: $r; Default Button: “OK”, Commit: “Yes”; Button 2: “Cancel”, Commit: “No” ]
                                        • Else If [ $r = 1 ]
                                        • Show Custom Dialog [ Title: "Verification valid"; Message: $r; Default Button: “OK”, Commit: “Yes”; Button 2: “Cancel”, Commit: “No” ]
                                        • Else [ ]
                                        • Show Custom Dialog [ Title: "Verification failed"; Message: $r; Default Button: “OK”, Commit: “Yes”; Button 2: “Cancel”, Commit: “No” ]
                                        • End If
                                        Fields used in this script
                                        Scripts used in this script
                                          Layouts used in this script
                                            Tables used in this script
                                            Table occurrences used by this script
                                            Custom Functions used by this script
                                              Custom menu set used by this script

                                                Download example: JWT RS256

                                                Used functions: