Skip to content

Instantly share code, notes, and snippets.

@mlist
Created December 13, 2013 12:40
Show Gist options
  • Save mlist/7943662 to your computer and use it in GitHub Desktop.
Save mlist/7943662 to your computer and use it in GitHub Desktop.
SecurityTokenService in grails
class SecurityTokenService {
def getSecurityToken(SomeDomainClass sdc) {
if(!sdc?.uuid){
sdc.uuid = UUID.randomUUID().toString()
sdc.save(flush:true)
}
return sdc.uuid
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment