-
Notifications
You must be signed in to change notification settings - Fork 441
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Added a function-based request checker to allow users to specify thei…
…r own request ID check functions. This allows you to check IDs more carefully than you could with just an array - for example to do things like add timeouts to the validity of the auth id. For backward compatibility, I left the original functions in place. Also added an additional XML type for OAEP as current shibboleth returns a different type string old: http://www.w3.org/2001/04/xmlenc#rsa-oaep-mgf1p new: http://www.w3.org/2009/xmlenc11#rsa-oaep For backward compatibility, I left the original functions the same.
- Loading branch information
Showing
3 changed files
with
116 additions
and
32 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
package saml | ||
|
||
type RequestIdCheckFunction func(string) bool | ||
|
||
func createDefaultChecker(possibleRequestIDs []string) RequestIdCheckFunction { | ||
return func(id string) bool { | ||
for _, possibleRequestID := range possibleRequestIDs { | ||
if id == possibleRequestID { | ||
return true | ||
} | ||
} | ||
return false | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters