com.ibm.mfp.adapter.api

Interface OAuthSecurity

  • All Superinterfaces:
    java.lang.annotation.Annotation


    This annotation is used to configure protection of Java API for RESTful Web Services (JAX-RS) adapter resources.
    By default, all MobileFirst adapter resources require an access token, and are therefore protected by the security framework.
    Use this annotation to assign custom security scopes to your resources, or to disable the default MobileFirst resource protection.
    The annotation can be applied either to a specific resource method or to an entire resource class. Method-level annotations override class-level annotations.
    • Method Summary

      Methods 
      Modifier and Type Method and Description
      boolean enabled()
      The resource-protection state: true - The resource is protected and requires an access token.
      java.lang.String scope()
      The scope that protects the resource, as a string of zero or more space-separated scope elements.
      • Methods inherited from interface java.lang.annotation.Annotation

        annotationType, equals, hashCode, toString
    • Method Detail

      • scope

        java.lang.String scope()
        The scope that protects the resource, as a string of zero or more space-separated scope elements. A scope element can be a keyword that is mapped to a security check, or the name of a security check.
        The default value of this element is an empty string.
        When the value of the OAuthSecurity.enabled() element is false, the scope element is ignored.
        Returns:
        The protecting scope.
      • enabled

        boolean enabled()
        The resource-protection state:
        • true - The resource is protected and requires an access token. This is the default value.
        • false - The resource is not protected and does not require an access token.
          When this value is set, the OAuthSecurity.scope() element is ignored.
        Returns:
        true if the resource is protected, or false if it is not protected.


© Copyright IBM Corp. 2006, 2015. All Rights Reserved.