Skip to content

Commit

Permalink
Pointed to Red Hat prod SSO with designated clientId
Browse files Browse the repository at this point in the history
  • Loading branch information
tirthct committed Jan 16, 2024
1 parent 5d4ae1a commit b09f679
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 4 deletions.
4 changes: 2 additions & 2 deletions authentication/auth.go
Original file line number Diff line number Diff line change
Expand Up @@ -73,8 +73,8 @@ func VerifyLogin(clientID string) (string, error) {
ClientSecret: "",
Scopes: []string{"openid"},
Endpoint: oauth2.Endpoint{
AuthURL: "https://sso.stage.redhat.com/auth/realms/redhat-external/protocol/openid-connect/auth",
TokenURL: "https://sso.stage.redhat.com/auth/realms/redhat-external/protocol/openid-connect/token",
AuthURL: "https://sso.redhat.com/auth/realms/redhat-external/protocol/openid-connect/auth",
TokenURL: "https://sso.redhat.com/auth/realms/redhat-external/protocol/openid-connect/token",
},
RedirectURL: "http://127.0.0.1:9998/oauth/callback",
}
Expand Down
3 changes: 1 addition & 2 deletions examples/verify_authentication.go
Original file line number Diff line number Diff line change
Expand Up @@ -26,15 +26,14 @@ func main() {
}

// Create the connection, and remember to close it:
token, err := authentication.VerifyLogin("cloud-services")
token, err := authentication.VerifyLogin("ocm-cli")
if err != nil {
fmt.Fprintf(os.Stderr, "Can't get token: %v\n", err)
os.Exit(1)
}
connection, err := sdk.NewConnectionBuilder().
Logger(logger).
Tokens(token).
URL("http://localhost:8000").
BuildContext(ctx)
if err != nil {
fmt.Fprintf(os.Stderr, "Can't build connection: %v\n", err)
Expand Down

0 comments on commit b09f679

Please sign in to comment.