{"id":22268167,"url":"https://github.com/curityio/twitter-authenticator","last_synced_at":"2025-03-25T14:45:39.442Z","repository":{"id":74437603,"uuid":"113563808","full_name":"curityio/twitter-authenticator","owner":"curityio","description":"Twitter oauth authenticator that can be used with any Java-based Web API","archived":false,"fork":false,"pushed_at":"2020-10-19T16:00:10.000Z","size":1073,"stargazers_count":1,"open_issues_count":0,"forks_count":2,"subscribers_count":4,"default_branch":"master","last_synced_at":"2025-01-30T13:31:09.518Z","etag":null,"topics":["authenticator","curity","java","login","oauth","plugin","twiiter"],"latest_commit_sha":null,"homepage":"https://curity.io/resources/learn/twitter-authenticator/","language":"Java","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/curityio.png","metadata":{"files":{"readme":"README.rst","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2017-12-08T10:44:41.000Z","updated_at":"2023-04-26T13:49:25.000Z","dependencies_parsed_at":"2023-02-26T18:16:14.199Z","dependency_job_id":null,"html_url":"https://github.com/curityio/twitter-authenticator","commit_stats":null,"previous_names":[],"tags_count":3,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/curityio%2Ftwitter-authenticator","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/curityio%2Ftwitter-authenticator/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/curityio%2Ftwitter-authenticator/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/curityio%2Ftwitter-authenticator/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/curityio","download_url":"https://codeload.github.com/curityio/twitter-authenticator/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":245486104,"owners_count":20623239,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["authenticator","curity","java","login","oauth","plugin","twiiter"],"created_at":"2024-12-03T11:11:47.605Z","updated_at":"2025-03-25T14:45:39.417Z","avatar_url":"https://github.com/curityio.png","language":"Java","funding_links":[],"categories":[],"sub_categories":[],"readme":"Twitter Authenticator Plug-in\n=============================\n   \n.. image:: https://img.shields.io/badge/quality-production-green\n    :target: https://curity.io/resources/code-examples/status/\n\n.. image:: https://img.shields.io/badge/availability-bundled-green\n    :target: https://curity.io/resources/code-examples/status/\n\n\nThis project provides an opens source Twitter Authenticator plug-in for the Curity Identity Server. This allows an administrator to add functionality to Curity which will then enable end users to login using their Twitter credentials. The app that integrates with Curity may also be configured to receive the Twitter access token and refresh token, allowing it to manage resources in Twitter.\n\nSystem Requirements\n~~~~~~~~~~~~~~~~~~~\n\n* Curity Identity Server 2.4.0+ and `its system requirements \u003chttps://developer.curity.io/docs/latest/system-admin-guide/system-requirements.html\u003e`_\n\nRequirements for Building from Source\n\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\n\n* Maven 3\n* Java JDK v. 8\n\nCompiling the Plug-in from Source\n~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\n\nThe source is very easy to compile. To do so from a shell, issue this command: ``mvn package``.\n\nThis will place the package, along with the relevant dependencies, in the ``target/libs`` directory.\n\nInstallation\n~~~~~~~~~~~~\n\nTo install this plug-in, either download a binary version available from the `releases section of this project's GitHub repository \u003chttps://github.com/curityio/twitter-authenticator/releases\u003e`_ or compile it from source (as described above). If you compiled the plug-in from source, the package will be placed in the ``target/libs`` subdirectory. The resulting JAR file or the one downloaded from GitHub needs to placed in the directory ``${IDSVR_HOME}/usr/share/plugins/twitter``. (The name of the last directory, ``twitter``, which is the plug-in group, is arbitrary and can be anything.) After doing so, the plug-in will become available as soon as the node is restarted.\n\n.. note::\n\n    The JAR file needs to be deployed to each run-time node and the admin node. For simple test deployments where the admin node is a run-time node, the JAR file only needs to be copied to one location.\n\nThe following dependent JAR file must be in the same directory, the plugin group directory:\n\n- `scribejava-core-7.1.1.jar \u003chttps://repo1.maven.org/maven2/com/github/scribejava/scribejava-core/7.1.1/scribejava-core-7.1.1.jar\u003e`_\n\nAfter running ``mvn package``, this will be placed into the ``target/libs`` directory and can be copied from there to the plugin group directory.\n\nFor a more detailed explanation of installing plug-ins, refer to the `Curity developer guide \u003chttps://developer.curity.io/docs/latest/developer-guide/plugins/index.html#plugin-installation\u003e`_.\n\nCreating an App in Twitter\n~~~~~~~~~~~~~~~~~~~~~~~~~~\n\nAs `described in the Twitter documentation \u003chttps://developer.twitter.com/en/docs/basics/authentication/overview/oauth\u003e`_, you can `create apps \u003chttps://apps.twitter.com\u003e`_ that use the Twitter APIs as shown in the following figure:\n\n    .. figure:: docs/images/create-twitter-app1.png\n        :name: doc-new-twitter-app\n        :align: center\n        :width: 500px\n\n    Fill in the name, description and website and save changes.\n\nAs you create it, you'll be shown the ``API Key`` and ``API secret Key``. You'll need these later when configuring the plug-in in Curity.\n\nFrom the app's main page, you need to enable OAuth by clicking on the ``Edit`` button next to ``Authentication settings``. From there, click on ``Enable 3-legged OAuth``. You may toggle on ``Request email address from users`` as well. Configure the callback URL. To obtain this, you'll need the `endpoint of the server \u003chttps://curity.io/resources/tutorials/howtos/concepts/endpoints/\u003e`_ and the final part of the URL will be the ID of the Twitter authenticator and the string ``callback``. An example configuration is shown in the following fiture:\n\n    .. figure:: docs/images/oauth-settings.png\n        :align: center\n        :width: 500px\n\nAlso, on the main app page in the Twitter developer portal, you can manage permissions in the ``Permissions`` section as show in below figure:\n\n    .. figure:: docs/images/twitter-update-permissions.png\n        :align: center\n        :width: 500px\n\nCreating a Twitter Authenticator in Curity\n~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\n\nThe easiest way to configure a new Twitter authenticator is using the Curity admin UI. The configuration can be downloaded as XML from the CLI and the same can be done using CLI, so only the steps to do this in the GUI will be described.\n\n1. Go to the ``Authenticators`` page of the authentication profile wherein the authenticator instance should be created.\n2. Click the ``New Authenticator`` button.\n3. Enter a name (e.g., ``twitter1``). This name needs to match the URI component in the callback URI set in the Twitter app.\n4. For the type, pick the ``Twitter`` option:\n\n    .. figure:: docs/images/twitter-authenticator-type-in-curity.png\n        :align: center\n        :width: 600px\n\n5. On the next page, you can define all of the standard authenticator configuration options like any previous authenticator that should run, the resulting ACR, transformers that should executed, etc. At the top of the configuration page, the Twitter-specific options can be found.\n\n    .. note::\n\n        The Twitter-specific configuration is generated dynamically based on the `configuration model defined in the Java interface \u003chttps://github.com/curityio/twitter-authenticator/blob/master/src/main/java/io/curity/identityserver/plugin/twitter/config/TwitterAuthenticatorPluginConfig.java\u003e`_.\n\n6. In the ``API Key`` textfield, enter the ``API Key`` from the Twitter client app.\n7. Also enter the ``API secret Key`` generated by Twitter when the app was created there.\n\nOnce all of these changes are made, they will be staged, but not committed (i.e., not running). To make them active, click the ``Commit`` menu option in the ``Changes`` menu. Optionally enter a comment in the ``Deploy Changes`` dialogue and click ``OK``.\n\nOnce the configuration is committed and running, the authenticator can be used like any other.\n\nLicense\n~~~~~~~\n\nThis plugin and its associated documentation is listed under the `Apache 2 license \u003cLICENSE\u003e`_. Dependencies have their own licenses. Refer to the home page of those projects for details.\n\nMore Information\n~~~~~~~~~~~~~~~~\n\nPlease visit `curity.io \u003chttps://curity.io/\u003e`_ for more information about the Curity Identity Server.\n\nCopyright (C) 2020 Curity AB.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcurityio%2Ftwitter-authenticator","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fcurityio%2Ftwitter-authenticator","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcurityio%2Ftwitter-authenticator/lists"}