Skip to content

Commit 9429887

Browse files
authored
reduce client blast radius (#171)
1 parent b28499c commit 9429887

File tree

2 files changed

+22
-0
lines changed

2 files changed

+22
-0
lines changed

pkg/fusionauth/Domain.go

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4364,6 +4364,21 @@ func (b *MonthlyActiveUserReportResponse) SetStatus(status int) {
43644364
b.StatusCode = status
43654365
}
43664366

4367+
/**
4368+
* Communicate various contexts in which multi-factor authentication can be used.
4369+
*/
4370+
type MultiFactorContext string
4371+
4372+
func (e MultiFactorContext) String() string {
4373+
return string(e)
4374+
}
4375+
4376+
const (
4377+
MultiFactorContext_ChangePassword MultiFactorContext = "changePassword"
4378+
MultiFactorContext_Login MultiFactorContext = "login"
4379+
MultiFactorContext_StepUp MultiFactorContext = "stepUp"
4380+
)
4381+
43674382
/**
43684383
* @author Daniel DeGroff
43694384
*/

pkg/fusionauth/Domain_dynamic_test.go

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -371,6 +371,13 @@ func Test_MessengerTypeImplementsStringer(t *testing.T) {
371371
}
372372
}
373373

374+
func Test_MultiFactorContextImplementsStringer(t *testing.T) {
375+
var enum interface{} = MultiFactorContext("Test")
376+
if _, ok := enum.(fmt.Stringer); !ok {
377+
t.Errorf("MultiFactorContext does not implement stringer interface\n")
378+
}
379+
}
380+
374381
func Test_MultiFactorLoginPolicyImplementsStringer(t *testing.T) {
375382
var enum interface{} = MultiFactorLoginPolicy("Test")
376383
if _, ok := enum.(fmt.Stringer); !ok {

0 commit comments

Comments
 (0)