View Javadoc

1   package com.atlassian.asap.core.server.jersey;
2   
3   import java.lang.annotation.ElementType;
4   import java.lang.annotation.Inherited;
5   import java.lang.annotation.Retention;
6   import java.lang.annotation.RetentionPolicy;
7   import java.lang.annotation.Target;
8   
9   /**
10   * Asap is an annotation that will allow Jersey resource packages, classes, or methods to opt into ASAP authorization.
11   */
12  @Target({ElementType.METHOD, ElementType.TYPE, ElementType.PACKAGE})
13  @Retention(RetentionPolicy.RUNTIME)
14  @Inherited
15  public @interface Asap {
16      /**
17       * Only the subjects explicitly listed will be authorized.  If the subject isn't defined on an ASAP token, the
18       * issuer value is used.  If the whitelist is empty, no authorization will take place.
19       */
20      String[] authorizedSubjects() default {};
21  
22      /**
23       * Only the issuers explicitly listed will be authorized. If omitted/empty, the list of authorized issuers will be
24       * equal to the list of authorized subjects ({@link #authorizedSubjects()}.
25       */
26      String[] authorizedIssuers() default {};
27  
28      /**
29       * @return {@code true} if ASAP is enabled, {@code false} if it is disabled, applying no
30       * authentication or authorization.
31       * @since 2.6.1
32       */
33      boolean enabled() default true;
34  }