Last active
February 10, 2016 22:37
-
-
Save tdhsmith/ec328a3db37ffe4718bd to your computer and use it in GitHub Desktop.
Simplified flow for default user model interactions in JWTAuth
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# http://www.graphviz.org/content/cluster | |
digraph G { | |
rankdir = LR; | |
splines = line; | |
subgraph cluster_package { | |
subgraph cluster_0 { | |
color=blue; | |
node [style=filled]; | |
label = "JWT"; | |
subgraph cluster_1 { | |
rank=same; | |
color=purple; | |
node [style=filled]; | |
label = "JWTAuth"; | |
toUser -> authenticate [constraint=false]; | |
attempt; | |
} | |
fromUser; | |
} | |
subgraph cluster_2 { | |
node [style=filled]; | |
label = "Auth provider\n(Illuminate)"; | |
color=red; | |
byId; | |
byCredentials; | |
} | |
subgraph cluster_5 { | |
node [style=filled]; | |
label = "JWTSubject"; | |
color=teal; | |
subgraph cluster_8 { | |
node [style=filled]; | |
label = "User"; | |
style= dashed; | |
color=teal; | |
getJWTIdentifier; | |
} | |
} | |
style=dotted; | |
label="jwt-auth library"; | |
} | |
subgraph cluster_3 { | |
node [style=filled]; | |
label = "Guard contract\n(SessionGuard)"; | |
color=orange; | |
onceUsingId; | |
once -> "attempt " -> hasValidCredentials [constraint=false]; | |
}; | |
subgraph cluster_4 { | |
node [style=filled]; | |
label = "User provider\n(EloquentUserProvider)"; | |
color=green; | |
retrieveById; | |
retrieveByCredentials; | |
validateCredentials; | |
} | |
subgraph cluster_6 { | |
node [style=filled]; | |
label = "Model queries\n(QueryBuilder)"; | |
color=gray; | |
find -> where [constraint=false]; | |
} | |
subgraph cluster_7 { | |
node [style=filled]; | |
label = "Hasher"; | |
color=gray; | |
check; | |
} | |
START [shape=diamond]; | |
START -> toUser; | |
START -> fromUser -> getJWTIdentifier; | |
START -> authenticate -> byId; | |
byId -> onceUsingId [constraint=false]; | |
onceUsingId -> retrieveById -> find; | |
START -> attempt -> byCredentials; | |
byCredentials -> once [constraint=false]; | |
getJWTIdentifier -> onceUsingId [style=invis]; | |
"attempt " -> retrieveByCredentials -> where; | |
hasValidCredentials -> validateCredentials -> check; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment