• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

smartsheet / smartsheet-java-sdk / #55

02 Oct 2024 07:40PM UTC coverage: 60.548% (+0.7%) from 59.836%
#55

push

github

web-flow
Release prep for 3.2.1 (#103)

4156 of 6864 relevant lines covered (60.55%)

0.61 hits per line

Source File
Press 'n' to go to next uncovered line, 'b' for previous

47.06
/src/main/java/com/smartsheet/api/oauth/AuthorizationResult.java
1
/*
2
 * Copyright (C) 2024 Smartsheet
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
 *      http://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 com.smartsheet.api.oauth;
18

19
/**
20
 * Represents an OAuth authorization result.
21
 */
22
public class AuthorizationResult {
1✔
23
    /**
24
     * Represents the authorization code which is required to obtain an access token.
25
     */
26
    private String code;
27

28
    /**
29
     * Represents the total number of seconds that the authorization token is valid. This is always 4 minutes.
30
     */
31
    private long expiresInSeconds;
32

33
    /**
34
     * Represents the state string which is returned to the redirect URL for a registered application.
35
     */
36
    private String state;
37

38
    /**
39
     * Gets the authorization code which is required to obtain an access token.
40
     *
41
     * @return the authorization code
42
     */
43
    public String getCode() {
44
        return code;
1✔
45
    }
46

47
    /**
48
     * Sets the authorization code which is required to obtain an access token.
49
     *
50
     * @param code the new code
51
     */
52
    public void setCode(String code) {
53
        this.code = code;
1✔
54
    }
1✔
55

56
    /**
57
     * Gets the total number of seconds that the authorization token is valid. This is always 4 minutes.
58
     *
59
     * @return the expires in seconds
60
     */
61
    public long getExpiresInSeconds() {
62
        return expiresInSeconds;
×
63
    }
64

65
    /**
66
     * Sets the total number of seconds that the authorization token is valid. This is always 4 minutes.
67
     *
68
     * @param expiresInSeconds the new expires in seconds
69
     */
70
    public void setExpiresInSeconds(long expiresInSeconds) {
71
        this.expiresInSeconds = expiresInSeconds;
1✔
72
    }
1✔
73

74
    /**
75
     * Gets the state string which is returned to the redirect URL for a registered application
76
     *
77
     * @return the state
78
     */
79
    public String getState() {
80
        return state;
×
81
    }
82

83
    /**
84
     * Sets the state string which is returned to the redirect URL for a registered application
85
     *
86
     * @param state the new state
87
     */
88
    public void setState(String state) {
89
        this.state = state;
1✔
90
    }
1✔
91

92
    /* (non-Javadoc)
93
     * @see java.lang.Object#toString()
94
     */
95
    @Override
96
    public String toString() {
97
        return new StringBuilder().append("AuthorizationResult [code=")
×
98
                .append(code)
×
99
                .append(", expiresInSeconds=")
×
100
                .append(expiresInSeconds)
×
101
                .append(", state=")
×
102
                .append(state)
×
103
                .append("]").toString();
×
104
    }
105
}
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2025 Coveralls, Inc