jgauffin / Griffin.Framework

Application framework for Business Applications
http://griffinframework.net
168 stars 62 forks source link

Exceptiontype for cqs authorization #61

Closed mwuerth closed 8 years ago

mwuerth commented 8 years ago

In Griffin.Cqs.Server AuthorizationModule.cs you throw AuthenticationException even whether you created an AuthorizationException in Griffin.Cqs/Authentication is there a reason for this purpose.

jgauffin commented 8 years ago

Can you please elaborate a bit?

The AuthorizationModule doesn't throw an exception, it creates a new exception to be able to let the base library use it to send an error back to the user.

If you throw another AuthenticationException it's processed efter the authentication module have finished.

mwuerth commented 8 years ago

My thought was that you could throw an AuthorizationException in the AuthorizationModule and not an AuthenticationException and i would like to know why.

jgauffin commented 8 years ago

ahh. of course :) Corrected in the next commit.