Giter Club home page Giter Club logo

redirect-action-example's Introduction

Redirect Action Example

Quality Availability

This repository is an example of an Authentication Action Plugin for the Curity Identity Server, which uses the redirect() response type. It consists of two parts:

  • the plugin code is in the identityserver.plugins.authenticationactions.redirect-action directory
  • example directory which contains a simple demo website to which the plugin action redirects. The demo is written in Java and Spring.

Running the example

To run the example follow these steps:

  • Start the project by running the command mvn spring-boot:start from the example directory.
  • Install the authentication plugin in your instance of the Curity Identity Server. Refer to the plugin's README to check how to do it.
  • When the plugin is installed, go to the admin UI, then Authentication Profile -> Authenticators. Edit an authenticator of your choice.
  • If you want to run the example with a local instance of the Spring application you'll need an HTTP client which uses the http scheme. To add such client click the Facilities button in the top right corner of the screen, scroll down to Http clients and click the New button.
  • Enter a suitable name for the client and click Create.

Create Http Client

  • Select the http scheme for the client and close the popup.

Select type

  • Back in the authenticator form, in the action column click the Add button in either Login or SSO flow.
  • Click New Action, enter a suitable name and select Redirect Action type.
  • Enter the required configuration.

Select type

Enter the values from the above screen to run this example.

  • Commit your changes. The action plugin is now ready.

Test with OAuth.tools

You can test the action using OAuth.tools. Have a look at this tutorial to learn how to configure OAuth.tools with your instance of the Curity Identity Server. Once you have an environment configured, you can start any OAuth flow to initiate authentication. You can add a Debug Action to your authentication flow to check the parameters set by the redirect action.

Running Tests Locally with Cypress

To run the test suite locally, first ensure that you have an instance of the Curity Identity Server running with the plugin installed and using the configuration found in tests/idsvr/config.xml. Next, run the example app located in example by using the Maven command mvn spring-boot:start. Then, install Cypress by using the following commands.

    cd tests
    npm i

You can then open the Cypress app to run tests with npm run cypress.open or run the headless version of the tests with npm run cypress.run.

Running the GitHub Actions Workflow Locally

To run the GitHub Actions workflow locally refer to this README. Note that in order to run the workflow for this plugin you will need to run the Curity Identity Server directly in the act container, as described at the end of the linked README file.

More Information

Please visit curity.io for more information about the Curity Identity Server.

redirect-action-example's People

Contributors

anestos avatar gary-archer avatar mtrojanowski avatar saulius-stasiukaitis-tg avatar suren-khatana avatar

Watchers

 avatar  avatar  avatar  avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.