Skip to content

Commit

Permalink
Add auto_redirect_to_identity to access organizations
Browse files Browse the repository at this point in the history
  • Loading branch information
Eduardo Gomes committed Apr 5, 2023
1 parent 93d8999 commit b60b857
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
1 change: 1 addition & 0 deletions access_organization.go
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ type AccessOrganization struct {
IsUIReadOnly *bool `json:"is_ui_read_only,omitempty"`
UIReadOnlyToggleReason string `json:"ui_read_only_toggle_reason,omitempty"`
UserSeatExpirationInactiveTime string `json:"user_seat_expiration_inactive_time,omitempty"`
AutoRedirectToIdentity *bool `json:"auto_redirect_to_identity,omitempty"`
}

// AccessOrganizationLoginDesign represents the login design options.
Expand Down
5 changes: 3 additions & 2 deletions access_organization_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,10 @@ package cloudflare
import (
"context"
"fmt"
"github.com/stretchr/testify/assert"

Check failure on line 6 in access_organization_test.go

View workflow job for this annotation

GitHub Actions / lint

File is not `goimports`-ed (goimports)
"net/http"
"testing"
"time"

"github.com/stretchr/testify/assert"
)

func TestAccessOrganization(t *testing.T) {
Expand All @@ -28,6 +27,7 @@ func TestAccessOrganization(t *testing.T) {
"auth_domain": "test.cloudflareaccess.com",
"is_ui_read_only": false,
"user_seat_expiration_inactive_time": "720h",
"auto_redirect_to_identity": true,
"login_design": {
"background_color": "#c5ed1b",
"logo_path": "https://example.com/logo.png",
Expand Down Expand Up @@ -57,6 +57,7 @@ func TestAccessOrganization(t *testing.T) {
},
IsUIReadOnly: BoolPtr(false),
UserSeatExpirationInactiveTime: "720h",
AutoRedirectToIdentity: BoolPtr(true),
}

mux.HandleFunc("/accounts/"+testAccountID+"/access/organizations", handler)
Expand Down

0 comments on commit b60b857

Please sign in to comment.