Skip to content

Commit

Permalink
Merge pull request RobotsAndPencils#24 from x-way/consistent-variable…
Browse files Browse the repository at this point in the history
…-name

Use consistent method receiver names
  • Loading branch information
mayankagwl authored Oct 26, 2020
2 parents 9fb528d + 0b21b41 commit 34983fa
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions internal/logoutRequest.go
Original file line number Diff line number Diff line change
Expand Up @@ -155,15 +155,15 @@ func (r *LogoutRequest) SignedXml(idpPrivateKey *rsa.PrivateKey) (string, error)
return signedXml, nil
}

func (a *LogoutRequest) Validate() error {
if a.ID == "" {
func (r *LogoutRequest) Validate() error {
if r.ID == "" {
return fmt.Errorf("request not contain the id")
}
/*if a.IssueInstant.Add(MaxIssueDelay).Before(time.Now()) {
return fmt.Errorf("request expired at %s", a.IssueInstant.Add(MaxIssueDelay))
/*if r.IssueInstant.Add(MaxIssueDelay).Before(time.Now()) {
return fmt.Errorf("request expired at %s", r.IssueInstant.Add(MaxIssueDelay))
}*/
if a.Version != "2.0" {
return fmt.Errorf("expected SAML request version 2.0 got %v", a.Version)
if r.Version != "2.0" {
return fmt.Errorf("expected SAML request version 2.0 got %v", r.Version)
}
return nil
}

0 comments on commit 34983fa

Please sign in to comment.