Skip to content

cloudfoundry/omniauth-uaa-oauth2

Repository files navigation

Cloud Foundry UAA OmniAuth Strategy

OmniAuth strategy for authenticating users using the CloudFoundry UAA server.

Add the following to your Gemfile:

gem 'omniauth-uaa-oauth2'

For example usage see:

Warning: Unlike the omniauth-oauth2 gem, this gem does not support the oauth2 'state' security parameter.

Your omniauth-uaa-oauth2 client application will need a corresponding UAA client registered that includes the authorization_code authorization grant type, and redirect URIs back to the full URL to your application's /auth/cloudfoundry/callback endpoint. For example:

uaa create-client omniauth-login-only -s omniauth-login-only \
  --authorized_grant_types authorization_code,refresh_token \
  --scope openid \
  --redirect_uri http://localhost:9292/auth/cloudfoundry/callback,http://127.0.0.1:9292/auth/cloudfoundry/callback