Skip to content

Commit

Permalink
feat: Update application definition to the latest (#127)
Browse files Browse the repository at this point in the history
I noticed that isShared flag is missing in the application definition. Updating the value to the latest from https://github.com/casdoor/casdoor/blob/master/object/application.go#L61C1-L123C1
  • Loading branch information
maknahar authored Sep 18, 2024
1 parent 64803a4 commit 0e8233a
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion casdoorsdk/application.go
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ type SamlItem struct {
Value string `json:"value"`
}

// Application has the same definition as https://github.com/casdoor/casdoor/blob/master/object/application.go#L24
// Application has the same definition as https://github.com/casdoor/casdoor/blob/master/object/application.go#L61
type Application struct {
Owner string `xorm:"varchar(100) notnull pk" json:"owner"`
Name string `xorm:"varchar(100) notnull pk" json:"name"`
Expand All @@ -86,6 +86,7 @@ type Application struct {
EnableSamlCompress bool `json:"enableSamlCompress"`
EnableSamlC14n10 bool `json:"enableSamlC14n10"`
EnableSamlPostBinding bool `json:"enableSamlPostBinding"`
UseEmailAsSamlNameId bool `json:"useEmailAsSamlNameId"`
EnableWebAuthn bool `json:"enableWebAuthn"`
EnableLinkWithEmail bool `json:"enableLinkWithEmail"`
OrgChoiceMode string `json:"orgChoiceMode"`
Expand All @@ -99,11 +100,13 @@ type Application struct {
CertPublicKey string `xorm:"-" json:"certPublicKey"`
Tags []string `xorm:"mediumtext" json:"tags"`
SamlAttributes []*SamlItem `xorm:"varchar(1000)" json:"samlAttributes"`
IsShared bool `json:"isShared"`

ClientId string `xorm:"varchar(100)" json:"clientId"`
ClientSecret string `xorm:"varchar(100)" json:"clientSecret"`
RedirectUris []string `xorm:"varchar(1000)" json:"redirectUris"`
TokenFormat string `xorm:"varchar(100)" json:"tokenFormat"`
TokenSigningMethod string `xorm:"varchar(100)" json:"tokenSigningMethod"`
TokenFields []string `xorm:"varchar(1000)" json:"tokenFields"`
ExpireInHours int `json:"expireInHours"`
RefreshExpireInHours int `json:"refreshExpireInHours"`
Expand All @@ -126,6 +129,7 @@ type Application struct {
FailedSigninFrozenTime int `json:"failedSigninFrozenTime"`
}


func (c *Client) GetApplications() ([]*Application, error) {
queryMap := map[string]string{
"owner": "admin",
Expand Down

0 comments on commit 0e8233a

Please sign in to comment.