Class SecurityToken

From TrainzOnline
(Difference between revisions)
Jump to: navigation, search
(Created page with "API Hierarchy *Class GSObject **Class JunctionBase <br> *Used as a security pass or key, to restrict access to certain functions/fu...")
 
Line 3: Line 3:
 
**[[Class JunctionBase]]
 
**[[Class JunctionBase]]
  
<br>
+
 
 
*Used as a security pass or key, to restrict access to certain functions/functionality.
 
*Used as a security pass or key, to restrict access to certain functions/functionality.
 
*A SecurityToken can be issued and validated by any [[Class TrainzGameObject]].
 
*A SecurityToken can be issued and validated by any [[Class TrainzGameObject]].
<br>
 
  
  
Line 19: Line 18:
 
;Syntax;
 
;Syntax;
 
  if (token.IsOwnerLocallyModified())
 
  if (token.IsOwnerLocallyModified())
   return;
+
   return; // Reject the token
 
;Notes
 
;Notes
 
*Can be used to reject tokens where the security may have been compromised by local edits.
 
*Can be used to reject tokens where the security may have been compromised by local edits.
 
<br>
 
<br>

Revision as of 11:00, 26 February 2024

API Hierarchy


  • Used as a security pass or key, to restrict access to certain functions/functionality.
  • A SecurityToken can be issued and validated by any Class TrainzGameObject.


Methods

IsOwnerLocallyModified

public native bool IsOwnerLocallyModified(void)
Parameters
  • None
Returned Value
  • Whether the asset the issuing script belongs to is locally modified.
Syntax;
if (token.IsOwnerLocallyModified())
  return; // Reject the token
Notes
  • Can be used to reject tokens where the security may have been compromised by local edits.


Personal tools