Documentation ¶
Index ¶
- type CommunicationData
- func (c *CommunicationData) Add(name string, req *http.Request, res *http.Response, reqBody, resBody string)
- func (c *CommunicationData) AddRequest(name string, req *http.Request, reqBody string)
- func (c *CommunicationData) AddResponseToLast(res *http.Response, resBody string)
- func (c *CommunicationData) Format() string
- func (c *CommunicationData) FormatHTML()
- func (c *CommunicationData) Redact()
- type Context
- type FlowInfo
- type HBod
- type IDTokenVerificationStatus
- type OIDCInfo
- func (c OIDCInfo) ATClaimsHTML() string
- func (c *OIDCInfo) ConvertFloats()
- func (c OIDCInfo) IDTokenClaimsHTML() string
- func (c OIDCInfo) IDTokenVerificationStatusHTML() string
- func (c OIDCInfo) MarshalBinary() ([]byte, error)
- func (c *OIDCInfo) UnmarshalBinary(data []byte) error
- func (c OIDCInfo) UserInfoHTML() string
- type ReqRes
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type CommunicationData ¶
type CommunicationData struct {
Comms []ReqRes
}
CommunicationData represents the data exchange during http communication.
func (*CommunicationData) Add ¶
func (c *CommunicationData) Add(name string, req *http.Request, res *http.Response, reqBody, resBody string)
Add adds an entry with request and response data from an http.Request and http.Response to the CommunicationData
func (*CommunicationData) AddRequest ¶
func (c *CommunicationData) AddRequest(name string, req *http.Request, reqBody string)
AddRequest adds a new entry with the request data from an http.Request to the CommunicationData
func (*CommunicationData) AddResponseToLast ¶
func (c *CommunicationData) AddResponseToLast(res *http.Response, resBody string)
AddResponseToLast adds the response data from an http.Response to the last entry in CommunicationData
func (*CommunicationData) Format ¶
func (c *CommunicationData) Format() string
Format formats the CommunicationData into a string.
func (*CommunicationData) FormatHTML ¶
func (c *CommunicationData) FormatHTML()
FormatHTML formats the CommunicationData into an html string. This also redacts client credentials.
func (*CommunicationData) Redact ¶
func (c *CommunicationData) Redact()
Redact redacts CommunicationData, i.e. it redacts all OIDC tokens.
type Context ¶
type Context struct { ClientConfig *provider.ClientConfig `json:"client_config,omitempty"` Comm *CommunicationData `json:"communication,omitempty"` }
Context holds the ClientConfig and CommunicationData context.
func (*Context) MarshalBinary ¶
MarshalBinary marshals Context into bytes.
func (*Context) UnmarshalBinary ¶
UnmarshalBinary unmarshalls bytes into Context.
type FlowInfo ¶
type FlowInfo struct { FlowName string OIDCInfo Communication CommunicationData CacheTimeMinutes uint64 }
FlowInfo represents the information about an OIDC flow run.
func (FlowInfo) MarshalBinary ¶
MarshalBinary marshals FlowInfo into bytes.
func (*FlowInfo) UnmarshalBinary ¶
UnmarshalBinary unmarshalls bytes into FlowInfo.
type IDTokenVerificationStatus ¶
type IDTokenVerificationStatus struct { NotMalformed bool `json:"not_malformed" html:"Token not malformed"` Signature bool `json:"signature_verified" html:"Signature verified"` Audience bool `json:"audience_verified" html:"Audience verified"` Issuer bool `json:"issuer_verified" html:"Issuer verified"` NotExpired bool `json:"not_expired" html:"Token not expired yet"` AlreadyValid bool `json:"already_valid" html:"Token already valid"` ATHash bool `json:"at_hash_verified" html:"Access Token hash verified"` }
IDTokenVerificationStatus represents the verification status of an id token.
type OIDCInfo ¶
type OIDCInfo struct { IDTokenClaims jwt.MapClaims IDTokenVerificationStatus *IDTokenVerificationStatus ATClaims jwt.MapClaims UserInfo jwt.MapClaims }
OIDCInfo represents OIDC information displayed as part of a FlowInfo
func (OIDCInfo) ATClaimsHTML ¶
ATClaimsHTML returns an html representation of the ATClaims
func (*OIDCInfo) ConvertFloats ¶
func (c *OIDCInfo) ConvertFloats()
ConvertFloats converts any float64 in any of the maps to an integer value
func (OIDCInfo) IDTokenClaimsHTML ¶
IDTokenClaimsHTML returns an html representation of the IDTokenClaims
func (OIDCInfo) IDTokenVerificationStatusHTML ¶
IDTokenVerificationStatusHTML returns an html representation of the IDTokenVerificationStatus
func (OIDCInfo) MarshalBinary ¶
MarshalBinary marshals OIDCInfo into bytes.
func (*OIDCInfo) UnmarshalBinary ¶
UnmarshalBinary unmarshalls bytes into OIDCInfo.
func (OIDCInfo) UserInfoHTML ¶
UserInfoHTML returns an html representation of the UserInfo