forked from forgejo/forgejo
Add microsoft oauth2 providers (#16544)
* Clean up oauth2 providers Signed-off-by: Andrew Thornton <art27@cantab.net> * Add AzureAD, AzureADv2, MicrosoftOnline OAuth2 providers Signed-off-by: Andrew Thornton <art27@cantab.net> * Apply suggestions from code review * remove unused Scopes Signed-off-by: Andrew Thornton <art27@cantab.net> Co-authored-by: techknowlogick <techknowlogick@gitea.io>
This commit is contained in:
parent
7e7006e00d
commit
ab9bb54144
29 changed files with 2132 additions and 260 deletions
22
vendor/github.com/markbates/going/LICENSE.txt
generated
vendored
Normal file
22
vendor/github.com/markbates/going/LICENSE.txt
generated
vendored
Normal file
|
@ -0,0 +1,22 @@
|
|||
Copyright (c) 2014 Mark Bates
|
||||
|
||||
MIT License
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining
|
||||
a copy of this software and associated documentation files (the
|
||||
"Software"), to deal in the Software without restriction, including
|
||||
without limitation the rights to use, copy, modify, merge, publish,
|
||||
distribute, sublicense, and/or sell copies of the Software, and to
|
||||
permit persons to whom the Software is furnished to do so, subject to
|
||||
the following conditions:
|
||||
|
||||
The above copyright notice and this permission notice shall be
|
||||
included in all copies or substantial portions of the Software.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
||||
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
||||
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
|
||||
NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
|
||||
LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
|
||||
OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
|
||||
WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
36
vendor/github.com/markbates/going/defaults/defaults.go
generated
vendored
Normal file
36
vendor/github.com/markbates/going/defaults/defaults.go
generated
vendored
Normal file
|
@ -0,0 +1,36 @@
|
|||
package defaults
|
||||
|
||||
func String(s1, s2 string) string {
|
||||
if s1 == "" {
|
||||
return s2
|
||||
}
|
||||
return s1
|
||||
}
|
||||
|
||||
func Int(i1, i2 int) int {
|
||||
if i1 == 0 {
|
||||
return i2
|
||||
}
|
||||
return i1
|
||||
}
|
||||
|
||||
func Int64(i1, i2 int64) int64 {
|
||||
if i1 == 0 {
|
||||
return i2
|
||||
}
|
||||
return i1
|
||||
}
|
||||
|
||||
func Float32(i1, i2 float32) float32 {
|
||||
if i1 == 0.0 {
|
||||
return i2
|
||||
}
|
||||
return i1
|
||||
}
|
||||
|
||||
func Float64(i1, i2 float64) float64 {
|
||||
if i1 == 0.0 {
|
||||
return i2
|
||||
}
|
||||
return i1
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue