Documentation ¶
Index ¶
- Variables
- type JWKSIntMock
- func (mock *JWKSIntMock) JWKSGetKeyset(awsRegion string, poolId string) (*jwks.JWKS, error)
- func (mock *JWKSIntMock) JWKSGetKeysetCalls() []struct{ ... }
- func (mock *JWKSIntMock) JWKSToRSAJSONResponse(jwksMoqParam *jwks.JWKS) ([]byte, error)
- func (mock *JWKSIntMock) JWKSToRSAJSONResponseCalls() []struct{ ... }
Constants ¶
This section is empty.
Variables ¶
View Source
var JWKSData = map[string]string{
"Oe/15Omy/K78yrUh2EI6xiQSRyeD5f8D/bcI/UphRR8=": "MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEA6MMhL+GcDj8LspuAes/ZycMTOYUkjURF+3z5vFtn0roie0LlcSgXN9i7VEsU7a+CTdqzBXhm/D4Yu9+RcVYJb8upyzWfrK53l4UoeNrQGhbjZlGKqnuQgU20lRqhKPqmHtAejm81XaW2T+z/bM2oL4U4RjOe5KaWLCpFe8IB92aTFZfXsPcfSodwQar7Po4TsRMg3iqqTk+jxySSYgj72XaCD5c3TojC6rdD/ll1dVub0LYjMESDnfFXDY4iCakk1l5MBwgEXDabJuNajfAotrFUN6svfb9DlXYSR9E/VYKxeDGdWB3QPIoieA/hpNhSM4nhWUApamxaCRC6g4dJjQIDAQAB",
"j+diD4wBP/VZ4+X51XGRdI8Vi0CNV0OpEefKl1ge3A8=": "MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAvBvi++N+F9MQO81xh71jIbkx81w4/sGhbztTJgIdhycV+lMzG6y3dMBWo9eRsFJuRs3MUFElmRrTVxc7EPWNQGQjUyPFW0/CnPPoGBCwgCyWtpNs5EHAkCHXsfryHb6LbJxH9LEbwOQCHR25/Bnqo/NeXSBJtvUabq3cTUgdOPc61Hskq+m19M1u7u1xu7b5DHD308Qyz3OhaEHx3cLL2za+mKxHe0VDe3sa5UfdaliTdBypFWJgNl6TsxF/G83fksgb3bVchzW45pu4dEhtNLqgXejH2+GwU8YRaAguKGW7dO/v+5uwLgDYQG9wgtAwLIMiXsFU7muig2pJEtlG2wIDAQAB",
}
View Source
var JWKSResponseData = `` /* 592-byte string literal not displayed */
View Source
var JWKSStubbed = &JWKSIntMock{ JWKSGetKeysetFunc: func(awsRegion string, poolId string) (*jwks.JWKS, error) { return &jwks.JWKS{ Keys: []jwks.JsonKey{ KeySetOne, KeySetTwo, }, }, nil }, JWKSToRSAJSONResponseFunc: func(jwksMoqParam *jwks.JWKS) ([]byte, error) { return []byte(JWKSResponseData), nil }, }
View Source
var KeySetOne = jwks.JsonKey{
E: "AQAB",
Kid: "j+diD4wBP/VZ4+X51XGRdI8Vi0CNV0OpEefKl1ge3A8=",
Kty: "RSA",
N: "vBvi--N-F9MQO81xh71jIbkx81w4_sGhbztTJgIdhycV-lMzG6y3dMBWo9eRsFJuRs3MUFElmRrTVxc7EPWNQGQjUyPFW0_CnPPoGBCwgCyWtpNs5EHAkCHXsfryHb6LbJxH9LEbwOQCHR25_Bnqo_NeXSBJtvUabq3cTUgdOPc61Hskq-m19M1u7u1xu7b5DHD308Qyz3OhaEHx3cLL2za-mKxHe0VDe3sa5UfdaliTdBypFWJgNl6TsxF_G83fksgb3bVchzW45pu4dEhtNLqgXejH2-GwU8YRaAguKGW7dO_v-5uwLgDYQG9wgtAwLIMiXsFU7muig2pJEtlG2w",
}
View Source
var KeySetTwo = jwks.JsonKey{
E: "AQAB",
Kid: "Oe/15Omy/K78yrUh2EI6xiQSRyeD5f8D/bcI/UphRR8=",
Kty: "RSA",
N: "6MMhL-GcDj8LspuAes_ZycMTOYUkjURF-3z5vFtn0roie0LlcSgXN9i7VEsU7a-CTdqzBXhm_D4Yu9-RcVYJb8upyzWfrK53l4UoeNrQGhbjZlGKqnuQgU20lRqhKPqmHtAejm81XaW2T-z_bM2oL4U4RjOe5KaWLCpFe8IB92aTFZfXsPcfSodwQar7Po4TsRMg3iqqTk-jxySSYgj72XaCD5c3TojC6rdD_ll1dVub0LYjMESDnfFXDY4iCakk1l5MBwgEXDabJuNajfAotrFUN6svfb9DlXYSR9E_VYKxeDGdWB3QPIoieA_hpNhSM4nhWUApamxaCRC6g4dJjQ",
}
Functions ¶
This section is empty.
Types ¶
type JWKSIntMock ¶
type JWKSIntMock struct { // JWKSGetKeysetFunc mocks the JWKSGetKeyset method. JWKSGetKeysetFunc func(awsRegion string, poolId string) (*jwks.JWKS, error) // JWKSToRSAJSONResponseFunc mocks the JWKSToRSAJSONResponse method. JWKSToRSAJSONResponseFunc func(jwksMoqParam *jwks.JWKS) ([]byte, error) // contains filtered or unexported fields }
JWKSIntMock is a mock implementation of jwks.JWKSInt.
func TestSomethingThatUsesJWKSInt(t *testing.T) { // make and configure a mocked jwks.JWKSInt mockedJWKSInt := &JWKSIntMock{ JWKSGetKeysetFunc: func(awsRegion string, poolId string) (*jwks.JWKS, error) { panic("mock out the JWKSGetKeyset method") }, JWKSToRSAJSONResponseFunc: func(jwksMoqParam *jwks.JWKS) ([]byte, error) { panic("mock out the JWKSToRSAJSONResponse method") }, } // use mockedJWKSInt in code that requires jwks.JWKSInt // and then make assertions. }
func (*JWKSIntMock) JWKSGetKeyset ¶
JWKSGetKeyset calls JWKSGetKeysetFunc.
func (*JWKSIntMock) JWKSGetKeysetCalls ¶
func (mock *JWKSIntMock) JWKSGetKeysetCalls() []struct { AwsRegion string PoolId string }
JWKSGetKeysetCalls gets all the calls that were made to JWKSGetKeyset. Check the length with:
len(mockedJWKSInt.JWKSGetKeysetCalls())
func (*JWKSIntMock) JWKSToRSAJSONResponse ¶
func (mock *JWKSIntMock) JWKSToRSAJSONResponse(jwksMoqParam *jwks.JWKS) ([]byte, error)
JWKSToRSAJSONResponse calls JWKSToRSAJSONResponseFunc.
func (*JWKSIntMock) JWKSToRSAJSONResponseCalls ¶
func (mock *JWKSIntMock) JWKSToRSAJSONResponseCalls() []struct { JwksMoqParam *jwks.JWKS }
JWKSToRSAJSONResponseCalls gets all the calls that were made to JWKSToRSAJSONResponse. Check the length with:
len(mockedJWKSInt.JWKSToRSAJSONResponseCalls())
Click to show internal directories.
Click to hide internal directories.