description |
---|
Get access to several security-focused methods to assist in your security journey. |
The CBSecurity model also has some methods that assist developers in their security needs
You can use the createPassword( length:32, letters:true, numbers:true, symbols:true )
// Generate a random password 32 characters in length
cbsecure().createPassword()
// Generate with no symbols and 16 characters
cbsecure().createPassword( length: 16, symbols: false )
// Generate with no numbers and 12 characters
cbsecure().createPassword( length: 12, numbers: false )
You can also leverage our internal utility methods to get the current request's IP address and hostname. Please remember that the default is to trust the upstream headers and check those first.
getRealIP( trustUpstream : true )
: Get a request's actual IP addressgetRealHost( trustUpstream : true )
: Get a request's actual hostname used