0
votes

I ran the code from below url. This is used for oauth2.o authentication OAuth2Sample.java

I am trying to authenticate, but instead of google as auth server, i want to use okta or any corporate auth server.

How can i change the redirect url or token endpoints.

By default it uses google endpoints https://accounts.google.com/o/oauth2/auth

I want to override it to use my custom auth server endpoints.

Could appreciate if you can helpe me here.

1

1 Answers

0
votes

The sample in question OAuth2Sample.java uses the Google api Java client library which is designed to allow developer to access Google discovery apis.

Google Discovery apis allow access to different Google systems, drive, calendar, YouTube to name a few. The only way to get access to those systems is to go though googles authentication server which is located at https://accounts.google.com/o/oauth2/auth You cant access google systems using okta or any corporate auth server as they dont have access to googles systems.