Class OAuth1SecurityContext

  • All Implemented Interfaces:
    javax.ws.rs.core.SecurityContext

    class OAuth1SecurityContext
    extends java.lang.Object
    implements javax.ws.rs.core.SecurityContext
    Security request that gets injected into the context by the OAuth filter based on the access token attached to the request.
    • Constructor Detail

      • OAuth1SecurityContext

        public OAuth1SecurityContext​(OAuth1Consumer consumer,
                                     boolean isSecure)
        Create a new OAuth security context from consumer.
        Parameters:
        consumer - OAuth consumer for which the context will be created.
        isSecure - true if the request is secured over SSL (HTTPS).
      • OAuth1SecurityContext

        public OAuth1SecurityContext​(OAuth1Token token,
                                     boolean isSecure)
        Create a new OAuth security context from Access Token.
        Parameters:
        token - Access Token.
        isSecure - true if the request is secured over SSL (HTTPS).
    • Method Detail

      • getUserPrincipal

        public java.security.Principal getUserPrincipal()
        Specified by:
        getUserPrincipal in interface javax.ws.rs.core.SecurityContext
      • isUserInRole

        public boolean isUserInRole​(java.lang.String string)
        Specified by:
        isUserInRole in interface javax.ws.rs.core.SecurityContext
      • isSecure

        public boolean isSecure()
        Specified by:
        isSecure in interface javax.ws.rs.core.SecurityContext
      • getAuthenticationScheme

        public java.lang.String getAuthenticationScheme()
        Specified by:
        getAuthenticationScheme in interface javax.ws.rs.core.SecurityContext