Name

global.JWTTokenRestricted

Description

No description available

Script

var JWTTokenRestricted = Class.create();
JWTTokenRestricted.prototype = Object.extend(new JWTTokenInternal(), {
  initialize: function(jwtProviderID) {
  	JWTTokenInternal.prototype.initialize.call(this,jwtProviderID);
  },
  
  isAllowedToGenerateJWT: function() {
  	if (!gs.isLoggedIn())
  		return false;

  	if ('system' == gs.getSession().getUserName())
  		return true;

  	var allowed = gs.hasRole('admin') || gs.hasRole('oauth_admin');
  	return allowed;	
  },

  type: 'JWTTokenRestricted'
});

Sys ID

89c727c6ff10330001d3cd6bd53bf136

Offical Documentation

Official Docs: