Interface OAuthIdentityTokenStrategy

  • All Superinterfaces:
    org.eclipse.lyo.server.oauth.core.token.TokenStrategy
    All Known Implementing Classes:
    ClusterableTokenStrategy

    public interface OAuthIdentityTokenStrategy
    extends org.eclipse.lyo.server.oauth.core.token.TokenStrategy
    A TokenStrategy that is aware of the OAuthIdentity of the authorizing user.
    Since:
    3.3.0
    • Method Detail

      • getOAuthIdentity

        OAuthIdentity getOAuthIdentity​(String oauthToken)
        Gets the OAuthIdentity associated with an access/request token. Implementations must catch (and cache) this identity during the OAuth dance.
        Parameters:
        oauthToken - the access or request token key.
        Returns:
        the associated identity if found, null otherwise.
      • setTwoLeggedOAuthIdentity

        void setTwoLeggedOAuthIdentity​(String consumerKey,
                                       OAuthIdentity identity)
        Convenient method to associate an OAuthIdentity with a consumer after a two-legged authentication. Since no end-user is involved in two-legged authentication requests, this method allows associating the consumer with the OAuthIdentity of the corresponding functional user once is resolved; subsequent requests can call then the getTwoLeggedOAuthIdentity(String) method to get the OAuthIdentity of the consumer without having to resolve it again.
        Parameters:
        consumerKey - the consumer key.
        identity - the identity of the consumer's functional user.