DZone
Thanks for visiting DZone today,
Edit Profile
  • Manage Email Subscriptions
  • How to Post to DZone
  • Article Submission Guidelines
Sign Out View Profile
  • Post an Article
  • Manage My Drafts
Over 2 million developers have joined DZone.
Log In / Join
Refcards Trend Reports
Events Video Library
Refcards
Trend Reports

Events

View Events Video Library

Zones

Culture and Methodologies Agile Career Development Methodologies Team Management
Data Engineering AI/ML Big Data Data Databases IoT
Software Design and Architecture Cloud Architecture Containers Integration Microservices Performance Security
Coding Frameworks Java JavaScript Languages Tools
Testing, Deployment, and Maintenance Deployment DevOps and CI/CD Maintenance Monitoring and Observability Testing, Tools, and Frameworks
Culture and Methodologies
Agile Career Development Methodologies Team Management
Data Engineering
AI/ML Big Data Data Databases IoT
Software Design and Architecture
Cloud Architecture Containers Integration Microservices Performance Security
Coding
Frameworks Java JavaScript Languages Tools
Testing, Deployment, and Maintenance
Deployment DevOps and CI/CD Maintenance Monitoring and Observability Testing, Tools, and Frameworks

Curious about the future of data-driven systems? Join our Data Engineering roundtable and learn how to build scalable data platforms.

Data Engineering: The industry has come a long way from organizing unstructured data to adopting today's modern data pipelines. See how.

Threat Detection: Learn core practices for managing security risks and vulnerabilities in your organization — don't regret those threats!

Managing API integrations: Assess your use case and needs — plus learn patterns for the design, build, and maintenance of your integrations.

Avatar

Brian Demers

Joined Mar 2008

About

twitter: @briandemers

Stats

Reputation: 718
Pageviews: 361.7K
Articles: 10
Comments: 14
  • Articles
  • Comments

Articles

article thumbnail
OAuth 2.0 Session Clustering
Learn how to control OAuth in a load-balanced application. This post shows how to manage sessions for a simple load-balanced application that uses OAuth 2.0.
November 16, 2021
· 4,878 Views · 6 Likes
article thumbnail
Use Both JWT and Opaque Access Tokens With Spring Boot
This article will introduce how to build a simple application that can validate JWTs remotely or locally based on the specific use case.
October 9, 2020
· 15,205 Views · 5 Likes
article thumbnail
Travis CI to GitHub Actions: What to Know About Migration
In this article, we take a look at how to migrate your existing repository to GitHub Actions with the Okta Maven Plugin.
August 5, 2020
· 6,414 Views · 2 Likes
article thumbnail
How to Use Apache Shiro and OAuth 2.0 to Build a Secure Application
This article demonstrates how to use Apache Shiro and OAuth 2.0 to create a secure Maven-based account with Okta.
July 29, 2020
· 13,062 Views · 3 Likes
article thumbnail
Securing Legacy Apps With OAuth 2.0 and Spring Cloud Gateway
Dive into legacy app security. This tutorial will show you how to keep your apps safe with OAuth 2.0 and Spring Cloud Gateway.
March 23, 2020
· 11,993 Views · 4 Likes
article thumbnail
Tutorial: How to Create a Maven Plugin
Learn more about how to create a Maven plugin.
December 4, 2019
· 17,334 Views · 12 Likes
article thumbnail
Build a Spring Boot App With Secure Server-to-Server Communication Via OAuth 2.0
How to build a Spring Boot App for server-to-server communication via the OAuth 2.0 Client Credentials Grant type.
Updated July 8, 2019
· 58,002 Views · 17 Likes
article thumbnail
Build a Secure SPA With Spring Boot and OAuth
Learn how to build a secure SPA using Spring Boot and OAuth while using a Spring Boot starter to get additional support for validation and authority mapping.
Updated November 28, 2017
· 31,872 Views · 33 Likes
article thumbnail
JAX-RS vs. Spring for REST Endpoints
Let's compare JAX-RS and Spring when working with REST endpoints, including using them separately and together, and a handy cheat sheet.
Updated August 11, 2017
· 115,138 Views · 35 Likes
article thumbnail
Protecting a Spring Boot App With Apache Shiro
Ditch roles and switch to permissions instead. See how to put them to use in your Spring Boot app with a hand from Apache Shiro.
Updated July 31, 2017
· 32,434 Views · 23 Likes

Comments

Tutorial: How to Create a Maven Plugin

Jun 16, 2022 · Krishna Dalal

I'm guessing you noticed, but it looks like there is a rendering issue on DZone in this section (it's missing the @Mojo annotation), however, you may have already found the code on GitHub or the original post:
https://developer.okta.com/blog/2019/09/23/tutorial-build-a-maven-plugin#write-the-maven-plugin-code

Back to your question! Maven plugins need to be bound to build phases. This happens by default for plugins like the compiler and jar plugin. For other plugins, you would need to add the plugin to a `pom.xml` and add an execution, In this case, using the `version` goal, Take a look at the official Maven docs to learn how to configure plugins: https://maven.apache.org/guides/mini/guide-configuring-plugins.html#configuring-build-plugins

Tutorial: How to Create a Maven Plugin

Jun 16, 2022 · Krishna Dalal

Thanks for following up Rahul! It's been a while since I've been on Windows. Hopefully, you were able to just set the argument `-Dgit.command="cmd /c git rev-parse --short=4 HEAD"`


How to Use Apache Shiro and OAuth 2.0 to Build a Secure Application

Aug 25, 2020 · Katie DeMatteis

OAuth 2.0 is actually all about authoriation on this side of the application. And you are trusting thatt whoever issued the token Authenticated the user. For many apps this fine, and is a common "resource server" technique.
OpenID Connect is built on top of OAuth and provides authentication. Take a look at this video for more details: https://www.youtube.com/watch?v=996OiexHze0

Build a Spring Boot App With Secure Server-to-Server Communication Via OAuth 2.0

Jul 10, 2019 · Brent Jensen

If the access token is expired, the Resource Server will return with a 403. At that point, you could make the client retry (with a new access token), or fail. Does that help?

Build a Spring Boot App With Secure Server-to-Server Communication Via OAuth 2.0

Jul 09, 2019 · Brent Jensen

Spring Security _should_ refresh the token for you (assuming you also have a refresh token). In the example above just a single request was made, the access token will only be requested once. Where are you checking the expiration of the access token?

Build a Spring Boot App With Secure Server-to-Server Communication Via OAuth 2.0

Jul 08, 2019 · Brent Jensen

Spring Security 5.x+ uses Nimbus behind the scenes. Is there something specific you are looking for?

Protecting a Spring Boot App With Apache Shiro

Dec 17, 2018 · Thomas Martin

I see what you are saying, the session cookie is processed first, and the auth header is not used. To get around this you could disable session handling by doing something like:

chainDefinition.addPathDefinition("/**", "noSessionCreation, authcBasic[permissive]");

Protecting a Spring Boot App With Apache Shiro

Dec 12, 2018 · Thomas Martin

What are you using to make the request? Are you using cookies? preemptive auth?

Protecting a Spring Boot App With Apache Shiro

Dec 12, 2018 · Thomas Martin

Take a look at one of the project's examples: https://github.com/apache/shiro/tree/master/samples/

Protecting a Spring Boot App With Apache Shiro

Dec 12, 2018 · Thomas Martin

Take a look at one of the project's examples: https://github.com/apache/shiro/tree/master/samples/

Protecting a Spring Boot App With Apache Shiro

Dec 12, 2018 · Thomas Martin

Sorry for the (very) late reply, but yes, you would just use a different Realm (a custom implementation or one of the existing ones)

Build a Spring Boot App With Secure Server-to-Server Communication Via OAuth 2.0

Jun 20, 2018 · Brent Jensen

That would be the role of the issuing IdP, (the server issuing the token). When the access token is exchanged for user-details/introspection, additional metadata could be returned (or a different set of scopes). Does that help?

JAX-RS vs. Spring for REST Endpoints

Aug 11, 2017 · Thomas Martin

The JSR process is and will always be [intentially] slow. Spring (or any other project) doesn't have these same restrictions, those projects will always be able to move faster. That said a lot of shops are not to keep pace with them, but that is a whole different topic ;)

Protecting a Spring Boot App With Apache Shiro

Jul 31, 2017 · Thomas Martin

Good question! A couple reasons off hand:

1.) You are supporting mutliple applications, not all of which are using Spring (think Guice, Dropwizard, raw Servlet, etc). Apache Shiro could be used in all of these to keep things consistent between each app.

2.) Migrating an existing web app to Spring Boot


User has been successfully modified

Failed to modify user

ABOUT US

  • About DZone
  • Support and feedback
  • Community research
  • Sitemap

ADVERTISE

  • Advertise with DZone

CONTRIBUTE ON DZONE

  • Article Submission Guidelines
  • Become a Contributor
  • Core Program
  • Visit the Writers' Zone

LEGAL

  • Terms of Service
  • Privacy Policy

CONTACT US

  • 3343 Perimeter Hill Drive
  • Suite 100
  • Nashville, TN 37211
  • support@dzone.com

Let's be friends: