Skip to content

Commit

Permalink
add getter and setter for redirect urls
Browse files Browse the repository at this point in the history
  • Loading branch information
KaiserWerk committed Nov 20, 2022
1 parent f8ee5e9 commit df31387
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 0 deletions.
8 changes: 8 additions & 0 deletions storage/client.go
Original file line number Diff line number Diff line change
Expand Up @@ -74,6 +74,14 @@ func (c Client) RemoveRedirectURL(u string) {
c.RedirectURLs = c.RedirectURLs[:len(c.RedirectURLs)-1] // last element now exists twice, so cut it off
}

func (c Client) GetRedirectURLs() []string {
return c.RedirectURLs
}

func (c Client) SetRedirectURLs(urls []string) {
c.RedirectURLs = urls
}

func (c Client) ClearRedirectURLS() {
c.RedirectURLs = make([]string, 0, 10)
}
Expand Down
2 changes: 2 additions & 0 deletions storage/clientStorage.go
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,8 @@ type OAuth2Client interface {
HasRedirectURL(string) bool
AddRedirectURL(string)
RemoveRedirectURL(string)
GetRedirectURLs() []string
SetRedirectURLs([]string)
ClearRedirectURLS()
}

Expand Down

0 comments on commit df31387

Please sign in to comment.