| .. | .. |
|---|
| 5 | 5 | import java.lang.annotation.RetentionPolicy; |
|---|
| 6 | 6 | import java.lang.annotation.Target; |
|---|
| 7 | 7 | |
|---|
| 8 | +import net.curisit.securis.utils.TokenHelper; |
|---|
| 9 | + |
|---|
| 8 | 10 | @Retention(RetentionPolicy.RUNTIME) |
|---|
| 9 | 11 | @Target(ElementType.METHOD) |
|---|
| 10 | 12 | public @interface Securable { |
|---|
| 11 | | - String header() default "session-token"; |
|---|
| 13 | + /** |
|---|
| 14 | + * Name of header parameter with the auth token to validate |
|---|
| 15 | + */ |
|---|
| 16 | + String header() default TokenHelper.TOKEN_HEADER_PÀRAM; |
|---|
| 17 | + |
|---|
| 18 | + /** |
|---|
| 19 | + * Bit mask with the rol or roles necessary to access the method |
|---|
| 20 | + */ |
|---|
| 21 | + int roles() default 0; |
|---|
| 12 | 22 | } |
|---|