Skip to content

Commit 0b92a98

Browse files
committed
Add interface for bindings that use a relay state
1 parent d23dce1 commit 0b92a98

File tree

4 files changed

+31
-3
lines changed

4 files changed

+31
-3
lines changed

src/Binding/HTTPArtifact.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@
4242
*
4343
* @package simplesamlphp/saml2
4444
*/
45-
class HTTPArtifact extends Binding
45+
class HTTPArtifact extends Binding implements RelayStateInterface
4646
{
4747
use RelayStateTrait;
4848

src/Binding/HTTPPost.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@
2727
*
2828
* @package simplesamlphp/saml2
2929
*/
30-
class HTTPPost extends Binding
30+
class HTTPPost extends Binding implements RelayStateInterface
3131
{
3232
use RelayStateTrait;
3333

src/Binding/HTTPRedirect.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@
3838
*
3939
* @package simplesamlphp/saml2
4040
*/
41-
class HTTPRedirect extends Binding
41+
class HTTPRedirect extends Binding implements RelayStateInterface
4242
{
4343
use RelayStateTrait;
4444

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
<?php
2+
3+
declare(strict_types=1);
4+
5+
namespace SimpleSAML\SAML2\Binding;
6+
7+
/**
8+
* Interface grouping common functionality for binding that use a RelayState.
9+
*
10+
* @package simplesamlphp/saml2
11+
*/
12+
interface RelayStateInterface
13+
{
14+
/**
15+
* Set the RelayState associated with he message.
16+
*
17+
* @param string|null $relayState The RelayState.
18+
*/
19+
public function setRelayState(?string $relayState = null): void;
20+
21+
22+
/**
23+
* Get the RelayState associated with the message.
24+
*
25+
* @return string|null The RelayState.
26+
*/
27+
public function getRelayState(): ?string;
28+
}

0 commit comments

Comments
 (0)