ctx.Logger.Debugf("Authorization Request with id '%s' on client with id '%s' is being redirected due to insufficient authentication",requester.GetID(),client.GetID())
ctx.Logger.Errorf("Authorization Request with id '%s' on client with id '%s' could not be processed: error occurred retrieving subject identifier for user '%s' and sector identifier '%s': %+v",requester.GetID(),client.GetID(),userSession.Username,client.GetSectorIdentifier(),err)
ctx.Logger.Debugf("Authorization Request with id '%s' on client with id '%s' proceeding to lookup consent by challenge id '%s'",requester.GetID(),client.GetID(),consentID)
ctx.Logger.Errorf("Authorization Request with id '%s' on client with id '%s' could not be processed: error occurred during consent session lookup: %+v",requester.GetID(),requester.GetClient().GetID(),err)
ctx.Logger.Errorf("Authorization Request with id '%s' on client with id '%s' could not process consent session with challenge id '%s': could not authorize the user user '%s' for this consent session: %v",requester.GetID(),client.GetID(),consent.ChallengeID,userSession.Username,err)
ctx.Logger.Errorf("Authorization Request with id '%s' on client with id '%s' could not be processed: this consent session with challenge id '%s' was already granted",requester.GetID(),client.GetID(),consent.ChallengeID)
ctx.Logger.Debugf("Authorization Request with id '%s' loaded consent session with id '%d' and challenge id '%s' for client id '%s' and subject '%s' and scopes '%s'",requester.GetID(),consent.ID,consent.ChallengeID,client.GetID(),consent.Subject.UUID,strings.Join(requester.GetRequestedScopes()," "))
ctx.Logger.Warnf("Authorization Request with id '%s' and challenge id '%s' for client id '%s' and subject '%s' and scopes '%s' was not denied by the user durng the consent session",requester.GetID(),consent.ChallengeID,client.GetID(),consent.Subject.UUID,strings.Join(requester.GetRequestedScopes()," "))
ctx.Logger.Errorf("Authorization Request with id '%s' on client with id '%s' had error looking up pre-configured consent sessions: %+v",requester.GetID(),requester.GetClient().GetID(),err)
ctx.Logger.Debugf("Authorization Request with id '%s' on client with id '%s' successfully looked up pre-configured consent with challenge id '%s'",requester.GetID(),client.GetID(),consent.ChallengeID)
ctx.Logger.Debugf("Authorization Request with id '%s' on client with id '%s' proceeding to generate a new consent due to unsuccessful lookup of pre-configured consent",requester.GetID(),client.GetID())
ctx.Logger.Errorf("Authorization Request with id '%s' on client with id '%s' could not be processed: error occurred generating consent: %+v",requester.GetID(),requester.GetClient().GetID(),err)
ctx.Providers.OpenIDConnect.Fosite.WriteAuthorizeError(rw,requester,fosite.ErrServerError.WithHint("Could not generate the consent session."))
ctx.Logger.Errorf("Authorization Request with id '%s' on client with id '%s' could not be processed: error occurred saving consent session: %+v",requester.GetID(),client.GetID(),err)
ctx.Providers.OpenIDConnect.Fosite.WriteAuthorizeError(rw,requester,fosite.ErrServerError.WithHint("Could not save the consent session."))
ctx.Logger.Debugf("Authorization Request with id '%s' on client with id '%s' authentication level '%s' is sufficient for client level '%s'",requester.GetID(),client.GetID(),authentication.LevelToString(userSession.AuthenticationLevel),authorization.LevelToString(client.Policy))
ctx.Logger.Debugf("Authorization Request with id '%s' on client with id '%s' authentication level '%s' is insufficient for client level '%s'",requester.GetID(),client.GetID(),authentication.LevelToString(userSession.AuthenticationLevel),authorization.LevelToString(client.Policy))
returnfmt.Errorf("failed to lookup subject: %w",err)
}
sid=subject.ID()
}
ifcsid!=sid{
returnfmt.Errorf("the consent subject identifier '%s' isn't owned by user '%s' who has a subject identifier of '%s' with sector identifier '%s'",consent.Subject.UUID,userSession.Username,subject,client.GetSectorIdentifier())
ctx.Logger.Debugf("Consent Session checked for pre-configuration with signature of client id '%s' and subject '%s' failed with error during load: %+v",clientID,subject,err)
returnnil,err
}
deferfunc(){
iferr:=rows.Close();err!=nil{
ctx.Logger.Errorf("Consent Session checked for pre-configuration with signature of client id '%s' and subject '%s' failed to close rows with error: %+v",clientID,subject,err)
}
}()
forrows.Next(){
ifconsent,err=rows.Get();err!=nil{
ctx.Logger.Debugf("Consent Session checked for pre-configuration with signature of client id '%s' and subject '%s' failed with error during iteration: %+v",clientID,subject,err)
ctx.Logger.Debugf("Consent Session checked for pre-configuration with signature of client id '%s' and subject '%s' found a result with challenge id '%s'",clientID,subject,consent.ChallengeID)
returnconsent,nil
}
ctx.Logger.Debugf("Consent Session checked for pre-configuration with signature of client id '%s' and subject '%s' did not find any results",clientID,subject)