File tree Expand file tree Collapse file tree 1 file changed +17
-0
lines changed
modules/sendgrid-sdk/handlers Expand file tree Collapse file tree 1 file changed +17
-0
lines changed Original file line number Diff line number Diff line change @@ -59,16 +59,33 @@ component {
59
59
return replace ( eventName , " _" , " " , " ALL" );
60
60
}
61
61
62
+ /**
63
+ * Checks if basic authentication was only partially configured.
64
+ *
65
+ * @return s True if the authentication credentials are only partially configured.
66
+ */
62
67
private function isPartialAuthCredentials () {
63
68
return ( structKeyExists ( sendgridSettings , " username" ) && ! structKeyExists ( sendgridSettings , " password" ) ) ||
64
69
( ! structKeyExists ( sendgridSettings , " username" ) && structKeyExists ( sendgridSettings , " password" ) );
65
70
}
66
71
72
+ /**
73
+ * Checks if basic authentication is needed for the request.
74
+ *
75
+ * @return s True if the request needs authorization.
76
+ */
67
77
private function needsAuth () {
68
78
return structKeyExists ( sendgridSettings , " username" ) ||
69
79
structKeyExists ( sendgridSettings , " password" );
70
80
}
71
81
82
+ /**
83
+ * Checks if the basic authentication credentials provided are valid.
84
+ *
85
+ * @event The ColdBox Request Context
86
+ *
87
+ * @return s True if the authentication credentials are invalid.
88
+ */
72
89
private function isInvalidAuthCredentials ( event ) {
73
90
var basicAuth = event .getHTTPBasicCredentials ();
74
91
return ( basicAuth .username ! = sendgridSettings .username ||
You can’t perform that action at this time.
0 commit comments