View Javadoc
1   /*
2    * Copyright 2008 Web Cohesion
3    *
4    * Licensed under the Apache License, Version 2.0 (the "License");
5    * you may not use this file except in compliance with the License.
6    * You may obtain a copy of the License at
7    *
8    *   https://www.apache.org/licenses/LICENSE-2.0
9    *
10   * Unless required by applicable law or agreed to in writing, software
11   * distributed under the License is distributed on an "AS IS" BASIS,
12   * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13   * See the License for the specific language governing permissions and
14   * limitations under the License.
15   */
16  
17  package org.springframework.security.oauth.provider;
18  
19  import java.io.Serializable;
20  
21  /**
22   * The credentials for an OAuth consumer request.
23   *
24   * @author Ryan Heaton
25   */
26  @SuppressWarnings("serial")
27  public class ConsumerCredentials implements Serializable {
28  
29    private final String consumerKey;
30    private final String signature;
31    private final String signatureMethod;
32    private final String signatureBaseString;
33    private final String token;
34  
35    public ConsumerCredentials(String consumerKey, String signature, String signatureMethod, String signatureBaseString, String token) {
36      this.signature = signature;
37      this.signatureMethod = signatureMethod;
38      this.signatureBaseString = signatureBaseString;
39      this.consumerKey = consumerKey;
40      this.token = token;
41    }
42  
43    /**
44     * The consumer key.
45     *
46     * @return The consumer key.
47     */
48    public String getConsumerKey() {
49      return consumerKey;
50    }
51  
52    /**
53     * The signature.
54     *
55     * @return The signature.
56     */
57    public String getSignature() {
58      return signature;
59    }
60  
61    /**
62     * The signature method.
63     *
64     * @return The signature method.
65     */
66    public String getSignatureMethod() {
67      return signatureMethod;
68    }
69  
70    /**
71     * The signature base string.
72     *
73     * @return The signature base string.
74     */
75    public String getSignatureBaseString() {
76      return signatureBaseString;
77    }
78  
79    /**
80     * The OAuth token.
81     *
82     * @return The OAuth token.
83     */
84    public String getToken() {
85      return token;
86    }
87  }