Skip to content

Latest commit

 

History

History
56 lines (38 loc) · 1.42 KB

delegates.md

File metadata and controls

56 lines (38 loc) · 1.42 KB
description
Delegate yourself!

Delegates

CBSecurity comes bundled with the following delegate objects that you can use in your user objects and provide them with security capabilities.

DelegateDescription
Auth@cbsecurityThis delegate enables your application objects to deal with authentication features via delegation.
Authorizable@cbsecurityThis delegate adds authorization capabilities to your objects
JwtSubject@cbsecurityThis delegate adds JWT Subject methods to a target

Auth@cbsecurity

This delegate enables your application objects to deal with authentication features via delegation.

  • jwtAuth()
  • cbSecure()
  • auth()

{% code lineNumbers="true" %}

component name="User" delegates="auth@cbSecurity"{

}

{% endcode %}

Authorizable@cbsecurity

This delegate adds authorization capabilities to your objects.

  • hasPermission()
  • hasRole()
  • isLoggedIn()
  • guest()
  • hasAll()
  • hasNone()
  • sameUser()
component name="User" delegates="Authorizable@cbSecurity"{

}

JwtSubject@cbsecurity

This delegate adds JWT Subject methods to a target.

  • getJWTCustomClaims()
  • getJWTScopes()
component name="User" delegates="JwtSubject@cbSecurity"{

}