| @@ 107-117 (lines=11) @@ | ||
| 104 | * |
|
| 105 | * @return bool |
|
| 106 | */ |
|
| 107 | public static function isNsValid($value) |
|
| 108 | { |
|
| 109 | static $arr = array( |
|
| 110 | self::NS_PROTOCOL, |
|
| 111 | self::NS_METADATA, |
|
| 112 | self::NS_ASSERTION, |
|
| 113 | self::NS_XMLDSIG, |
|
| 114 | ); |
|
| 115 | ||
| 116 | return in_array($value, $arr); |
|
| 117 | } |
|
| 118 | ||
| 119 | /** |
|
| 120 | * @param string $value |
|
| @@ 191-200 (lines=10) @@ | ||
| 188 | * |
|
| 189 | * @return bool |
|
| 190 | */ |
|
| 191 | public static function isConfirmationMethodValid($value) |
|
| 192 | { |
|
| 193 | static $arr = array( |
|
| 194 | self::CONFIRMATION_METHOD_BEARER, |
|
| 195 | self::CONFIRMATION_METHOD_HOK, |
|
| 196 | self::CONFIRMATION_METHOD_SENDER_VOUCHES, |
|
| 197 | ); |
|
| 198 | ||
| 199 | return in_array($value, $arr); |
|
| 200 | } |
|
| 201 | ||
| 202 | /** |
|
| 203 | * @param string $value |
|
| @@ 207-217 (lines=11) @@ | ||
| 204 | * |
|
| 205 | * @return bool |
|
| 206 | */ |
|
| 207 | public static function isAuthnContextValid($value) |
|
| 208 | { |
|
| 209 | static $arr = array( |
|
| 210 | self::AUTHN_CONTEXT_PASSWORD, |
|
| 211 | self::AUTHN_CONTEXT_UNSPECIFIED, |
|
| 212 | self::AUTHN_CONTEXT_PASSWORD_PROTECTED_TRANSPORT, |
|
| 213 | self::AUTHN_CONTEXT_WINDOWS, |
|
| 214 | ); |
|
| 215 | ||
| 216 | return in_array($value, $arr); |
|
| 217 | } |
|
| 218 | ||
| 219 | /** |
|
| 220 | * @param string $value |
|
| @@ 224-234 (lines=11) @@ | ||
| 221 | * |
|
| 222 | * @return bool |
|
| 223 | */ |
|
| 224 | public static function isLogoutReasonValid($value) |
|
| 225 | { |
|
| 226 | static $arr = array( |
|
| 227 | self::LOGOUT_REASON_USER, |
|
| 228 | self::LOGOUT_REASON_ADMIN, |
|
| 229 | self::LOGOUT_REASON_GLOBAL_TIMEOUT, |
|
| 230 | self::LOGOUT_REASON_SP_TIMEOUT, |
|
| 231 | ); |
|
| 232 | ||
| 233 | return in_array($value, $arr); |
|
| 234 | } |
|
| 235 | } |
|
| 236 | ||