Skip to content
This repository has been archived by the owner on Sep 29, 2023. It is now read-only.

Releases: zalando-stups/stups-spring-oauth2-support

Support expressions to check 'realms'.

05 Feb 11:41
Compare
Choose a tag to compare

Expression-Support for 'realm'

This release bring support for realm-checks in expressions. An example can be seen here. For configuration have look at this line.

You can now define expressions like:

  • #oauth2.hasRealm('/customrealm')
  • #oauth2.hasAnyRealm('/customrealm','nextCustomRealm','howManyRealmsDoYouHaveMan')

You are also able to combine them:

  • (#oauth2.hasRealm('/customrealm') && #oauth2.hasScope('uid'))
  • (#oauth2.hasScope('uid') && #oauth2.hasAnyRealm('/customrealm','nextCustomRealm','howManyRealmsDoYouHaveMan'))

But to make the last expression a bit shorter, we also provide something like

  • #oauth2.hasUidScopeAndRealm('/customrealm')
  • #oauth2.hasUidScopeAndAnyRealm('/customrealm','nextCustomRealm','howManyRealmsDoYouHaveMan')

PR's merged

  • #24 thanks to Lukas Niemeier
  • #22 see above for description
  • #21 'choose request-factory by dependencies in classpath'

Thanks to all for reporting issues and PR's.

1.0.0

20 Aug 08:19
Compare
Choose a tag to compare

Release Notes

Introducing the StupsOAuth2RestTemplate

This is a simple extension of Spring's RestTemplate, which adds the Authorization: Bearer <ACCESS_TOKEN> header to each request. It obtains the current access token from an AccessTokenProvider.

0.9.11 - StupsTokensAccessTokenProvider

14 Aug 15:19
Compare
Choose a tag to compare

Release Notes

Introduced the StupsTokensAccessTokenProvider, which obtains OAuth2 access tokens from STUPS' tokens library and maps them to Spring security OAuth2AccessTokens.

Please use StupsTokensAccessTokenProvider in favor of StupsAccessTokenProvider!

The existing StupsAccessTokenProvider did not consider the expiration date of access tokens. This leads to a bug, when using it together with Spring's OAuthRestTemplate: Once an access token was obtained it will never expire and hence never be refreshed.